[−][src]Enum sysctl::CtlValue
An Enum that holds all values returned by sysctl calls.
Extract inner value with if let
or match
.
Example
ⓘThis example is not tested
let val_enum = sysctl::value("kern.osrevision"); if let sysctl::CtlValue::Int(val) = val_enum { println!("Value: {}", val); }
Variants
Int(i32)
String(String)
S64(u64)
Uint(u32)
Long(i64)
Ulong(u64)
U64(u64)
U8(u8)
U16(u16)
S8(i8)
S16(i16)
S32(i32)
U32(u32)
Temperature(Temperature)
Trait Implementations
impl Debug for CtlValue
[src]
impl Display for CtlValue
[src]
impl<'a> From<&'a CtlValue> for CtlType
[src]
impl PartialEq<CtlValue> for CtlValue
[src]
impl PartialOrd<CtlValue> for CtlValue
[src]
fn partial_cmp(&self, other: &CtlValue) -> Option<Ordering>
[src]
fn lt(&self, other: &CtlValue) -> bool
[src]
fn le(&self, other: &CtlValue) -> bool
[src]
fn gt(&self, other: &CtlValue) -> bool
[src]
fn ge(&self, other: &CtlValue) -> bool
[src]
impl StructuralPartialEq for CtlValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for CtlValue
impl Send for CtlValue
impl Sync for CtlValue
impl Unpin for CtlValue
impl UnwindSafe for CtlValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,