[][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):

  • N node
  • A char *
  • I int
  • IK[n] temperature in Kelvin, multiplied by an optional single digit power of ten scaling factor: 1 (default) gives deciKelvin, 0 gives Kelvin, 3 gives milliKelvin
  • IU unsigned int
  • L long
  • LU unsigned long
  • Q quad_t
  • QU u_quad_t
  • S,TYPE struct TYPE structures
flags: u32

Methods

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 PartialEq<CtlInfo> for CtlInfo[src]

impl Debug for CtlInfo[src]

Auto Trait Implementations

impl Sync for CtlInfo

impl Send for CtlInfo

impl Unpin for CtlInfo

impl RefUnwindSafe for CtlInfo

impl UnwindSafe for CtlInfo

Blanket Implementations

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.

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

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

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