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,
locked: &mut Locked<FileOpsCore>,
thread_group: &ThreadGroup,
) -> Result<(), Errno>
fn add_process( &self, locked: &mut Locked<FileOpsCore>, 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 get_freezer_state(&self) -> CgroupFreezerState
fn get_freezer_state(&self) -> CgroupFreezerState
Get the freezer
self state and effective state.Source§fn freeze(&self, locked: &mut Locked<FileOpsCore>)
fn freeze(&self, locked: &mut Locked<FileOpsCore>)
Freeze all tasks in the cgroup.
Auto Trait Implementations§
impl !Freeze for Cgroup
impl !RefUnwindSafe for Cgroup
impl Send for Cgroup
impl Sync for Cgroup
impl Unpin for Cgroup
impl !UnwindSafe 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<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 moreSource§impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.