Enum cgroups::error::ErrorKind

source ·
pub enum ErrorKind {
    WriteFailed,
    ReadFailed,
    ParseError,
    InvalidOperation,
    InvalidPath,
    Other,
}
Expand description

The different types of errors that can occur while manipulating control groups.

Variants

WriteFailed

An error occured while writing to a control group file.

ReadFailed

An error occured while trying to read from a control group file.

ParseError

An error occured while trying to parse a value from a control group file.

In the future, there will be some information attached to this field.

InvalidOperation

You tried to do something invalid.

This could be because you tried to set a value in a control group that is not a root control group. Or, when using unified hierarchy, you tried to add a task in a leaf node.

InvalidPath

The path of the control group was invalid.

This could be caused by trying to escape the control group filesystem via a string of “..”. This crate checks against this and operations will fail with this error.

Other

An unknown error has occured.

Trait Implementations

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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 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.