Function sysctl::value [] [src]

pub fn value(name: &str) -> Result<CtlValue, String>

Takes the name of the OID as argument and returns a result containing the sysctl value if success, the errno caused by sysctl() as string if failure.

Example

extern crate sysctl;

fn main() {
    println!("Value: {:?}", sysctl::value("kern.osrevision"));
}