Trait cgroups_rs::Hierarchy

source ·
pub trait Hierarchy: Debug + Send + Sync {
    // Required methods
    fn subsystems(&self) -> Vec<Subsystem>;
    fn root(&self) -> PathBuf;
    fn root_control_group(&self) -> Cgroup;
    fn parent_control_group(&self, path: &str) -> Cgroup;
    fn v2(&self) -> bool;
}
Expand description

Control group hierarchy (right now, only V1 is supported, but in the future Unified will be implemented as well).

Required Methods§

source

fn subsystems(&self) -> Vec<Subsystem>

Returns what subsystems are supported by the hierarchy.

source

fn root(&self) -> PathBuf

Returns the root directory of the hierarchy.

source

fn root_control_group(&self) -> Cgroup

Return a handle to the root control group in the hierarchy.

source

fn parent_control_group(&self, path: &str) -> Cgroup

Return a handle to the parent control group in the hierarchy.

source

fn v2(&self) -> bool

Implementors§