[][src]Struct sysctl::CtlInfo

pub struct CtlInfo {
    pub ctl_type: CtlType,
    pub fmt: String,
    pub flags: u32,
}

A structure representing control metadata

Fields

ctl_type: CtlType

The control type.

fmt: String

A string which specifies the format of the OID in a symbolic way.

This format is used as a hint by sysctl(8) to apply proper data formatting for display purposes.

Formats defined in sysctl(9):

flags: u32

Implementations

impl CtlInfo[src]

pub fn is_temperature(&self) -> bool[src]

Is this sysctl a temperature?

impl CtlInfo[src]

pub fn flags(&self) -> CtlFlags[src]

Return the flags for this sysctl.

pub fn struct_type(&self) -> Option<String>[src]

If the sysctl is a structure, return the structure type string.

Checks whether the format string starts with S, and returns the rest of the format string or None if the format String does not have a struct hint.

Trait Implementations

impl Debug for CtlInfo[src]

impl PartialEq<CtlInfo> for CtlInfo[src]

impl StructuralPartialEq for CtlInfo[src]

Auto Trait Implementations

impl RefUnwindSafe for CtlInfo

impl Send for CtlInfo

impl Sync for CtlInfo

impl Unpin for CtlInfo

impl UnwindSafe for CtlInfo

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, 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.