pub struct Cgroup { /* private fields */ }Expand description
Cgroup is a non-root cgroup in a cgroup hierarchy, and can have other Cgroups as children.
Implementations§
Trait Implementations§
Source§impl CgroupOps for Cgroup
impl CgroupOps for Cgroup
Source§fn add_process(&self, thread_group: &ThreadGroup) -> Result<(), Errno>
fn add_process(&self, thread_group: &ThreadGroup) -> Result<(), Errno>
Add a process to a cgroup. Errors if the cgroup has been deleted.
Source§fn new_child(&self, name: &FsStr) -> Result<CgroupHandle, Errno>
fn new_child(&self, name: &FsStr) -> Result<CgroupHandle, Errno>
Create a new sub-cgroup as a child of this cgroup. Errors if the cgroup is deleted, or a
child with
name already exists.Source§fn get_child(&self, name: &FsStr) -> Result<CgroupHandle, Errno>
fn get_child(&self, name: &FsStr) -> Result<CgroupHandle, Errno>
Gets the child with
name, errors if not found.Source§fn remove_child(&self, name: &FsStr) -> Result<CgroupHandle, Errno>
fn remove_child(&self, name: &FsStr) -> Result<CgroupHandle, Errno>
Remove a child from this cgroup and return it, if found. Errors if cgroup is deleted, or a
child with
name is not found.Source§fn get_children(&self) -> Result<Vec<CgroupHandle>, Errno>
fn get_children(&self) -> Result<Vec<CgroupHandle>, Errno>
Gets all children of this cgroup.
Source§fn get_pids(&self, _kernel: &Kernel) -> Vec<pid_t> ⓘ
fn get_pids(&self, _kernel: &Kernel) -> Vec<pid_t> ⓘ
Return all pids that belong to this cgroup.
Source§fn is_populated(&self) -> bool
fn is_populated(&self) -> bool
Whether the cgroup or any of its descendants have any processes.
Source§fn freezer(&self) -> Option<&dyn FreezerOps>
fn freezer(&self) -> Option<&dyn FreezerOps>
Returns freezer ops if freezer controller is supported.
Source§impl CpusetOps for Cgroup
impl CpusetOps for Cgroup
Source§fn cpuset_cpus(&self) -> Vec<u32>
fn cpuset_cpus(&self) -> Vec<u32>
Returns the cpuset cpus of the cgroup.
Source§fn set_cpuset_cpus(&self, cpus: Vec<u32>)
fn set_cpuset_cpus(&self, cpus: Vec<u32>)
Sets the cpuset cpus of the cgroup.
Source§impl FreezerOps for Cgroup
impl FreezerOps for Cgroup
Source§fn get_freezer_state(&self) -> CgroupFreezerState
fn get_freezer_state(&self) -> CgroupFreezerState
Get the freezer
self state and effective state.Auto Trait Implementations§
impl !Freeze for Cgroup
impl !RefUnwindSafe for Cgroup
impl !UnwindSafe for Cgroup
impl Send for Cgroup
impl Sync for Cgroup
impl Unpin for Cgroup
impl UnsafeUnpin for Cgroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more