Enum sysctl::CtlType[][src]

#[repr(u32)]
pub enum CtlType {
Show variants Node, Int, String, S64, Struct, Uint, Long, Ulong, U64, U8, U16, S8, S16, S32, U32, None,
}

An Enum that represents a sysctl’s type information.

Example

if let Ok(ctl) = sysctl::Ctl::new("kern.osrevision") {
    if let Ok(value) = ctl.value() {
        let val_type: sysctl::CtlType = value.into();
        assert_eq!(val_type, sysctl::CtlType::Int);
    }
}

Variants

Node
Int
String
S64
Struct
Uint
Long
Ulong
U64
U8
U16
S8
S16
S32
U32
None

Implementations

impl CtlType[src]

pub fn min_type_size(&self) -> usize[src]

Trait Implementations

impl Clone for CtlType[src]

impl Copy for CtlType[src]

impl Debug for CtlType[src]

impl From<&'_ CtlValue> for CtlType[src]

impl From<CtlValue> for CtlType[src]

impl From<u32> for CtlType[src]

impl PartialEq<CtlType> for CtlType[src]

impl StructuralPartialEq for CtlType[src]

Auto Trait Implementations

impl RefUnwindSafe for CtlType

impl Send for CtlType

impl Sync for CtlType

impl Unpin for CtlType

impl UnwindSafe for CtlType

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.