Struct cgroups_fs::Cgroup

source ·
pub struct Cgroup { /* private fields */ }
Expand description

A controller of a specific cgroups namespace.

This type supports a number of operations for manipulating with a cgroups namespace.

Implementations§

Defines a cgroup relation.

Notes:

Creates a cgroups namespace.

Notes:

  • Keep in mind the usual filesystem permissions (owner, group, and mode bits).

Removes a cgroups namespace.

Notes:

  • This method will fail if there are nested cgroups.
  • Keep in mind the usual filesystem permissions (owner, group, and mode bits).

Sets a binary or string value to the cgroup control file.

Sets a value to the cgroup control file.

Gets a string value from cgroup control file.

Gets a value from cgroup control file.

Attaches a task (thread) to the cgroup.

Lists tasks (threads) attached to the cgroup.

Kills (SIGKILL) all the attached to the cgroup tasks.

Trait Implementations§

Converts this type into a shared reference of the (usually inferred) input type.
Formats the value using the given formatter. 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.