#[repr(u32)]pub enum CtlType {
Show 16 variants
Node = 1,
Int = 2,
String = 3,
S64 = 4,
Struct = 5,
Uint = 6,
Long = 7,
Ulong = 8,
U64 = 9,
U8 = 10,
U16 = 11,
S8 = 12,
S16 = 13,
S32 = 14,
U32 = 15,
None = 0,
}
Expand description
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 = 1
Int = 2
String = 3
S64 = 4
Struct = 5
Uint = 6
Long = 7
Ulong = 8
U64 = 9
U8 = 10
U16 = 11
S8 = 12
S16 = 13
S32 = 14
U32 = 15
None = 0
Implementations§
Trait Implementations§
impl Copy for CtlType
impl StructuralPartialEq for CtlType
Auto Trait Implementations§
impl Freeze for CtlType
impl RefUnwindSafe for CtlType
impl Send for CtlType
impl Sync for CtlType
impl Unpin for CtlType
impl UnwindSafe for CtlType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more