pub struct Ctl {
    pub oid: Vec<c_int>,
}
Expand description

This struct represents a system control.

Fields

oid: Vec<c_int>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Ctl implements the IntoIterator trait to allow for easy iteration over nodes.

Example

use sysctl::Sysctl;

let kern = sysctl::Ctl::new("kern");
for ctl in kern {
    println!("{}", ctl.name().unwrap());
}

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Construct a Ctl from the name. Read more

Returns a result containing the sysctl name on success, or a SysctlError on failure. Read more

Returns a result containing the sysctl value type on success, or a Sysctl Error on failure. Read more

Returns a result containing the sysctl description if success, or an Error on failure. Read more

Returns a result containing the sysctl value on success, or a SysctlError on failure. Read more

A generic method that takes returns a result containing the sysctl value if success, or a SysctlError on failure. Read more

Returns a result containing the sysctl value as String on success, or a SysctlError on failure. Read more

Sets the value of a sysctl. Fetches and returns the new value if successful, or returns a SysctlError on failure. Read more

Sets the value of a sysctl with input as string. Fetches and returns the new value if successful, or returns a SysctlError on failure. Read more

Get the flags for a sysctl. Read more

Returns a Result containing the control metadata for a sysctl. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.