[−][src]Struct cgroups_rs::freezer::FreezerController
A controller that allows controlling the freezer
subsystem of a Cgroup.
In essence, this subsystem allows the user to freeze and thaw (== "un-freeze") the processes in the control group. This is done transparently so that neither the parent, nor the children of the processes can observe the freeze.
Note that if the control group is currently in the Frozen
or Freezing
state, then no
processes can be added to it.
Implementations
impl FreezerController
[src]
pub fn new(root: PathBuf, v2: bool) -> Self
[src]
Contructs a new FreezerController
with root
serving as the root of the control group.
pub fn freeze(&self) -> Result<()>
[src]
Freezes the processes in the control group.
pub fn thaw(&self) -> Result<()>
[src]
Thaws, that is, unfreezes the processes in the control group.
pub fn state(&self) -> Result<FreezerState>
[src]
Retrieve the state of processes in the control group.
Trait Implementations
impl Clone for FreezerController
[src]
pub fn clone(&self) -> FreezerController
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FreezerController
[src]
impl<'a> From<&'a Subsystem> for &'a FreezerController
[src]
pub fn from(sub: &'a Subsystem) -> &'a FreezerController
[src]
Auto Trait Implementations
impl RefUnwindSafe for FreezerController
[src]
impl Send for FreezerController
[src]
impl Sync for FreezerController
[src]
impl Unpin for FreezerController
[src]
impl UnwindSafe for FreezerController
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Controller for T where
T: ControllerInternal,
[src]
T: ControllerInternal,
pub fn control_type(&Self) -> Controllers
[src]
pub fn path(&Self) -> &Path
[src]
pub fn apply(&Self, &Resources) -> Result<(), Error>
[src]
Apply a set of resources to the Controller, invoking its internal functions to pass the kernel the information.
pub fn create(&Self)
[src]
Create this controller
pub fn set_notify_on_release(&Self, bool) -> Result<(), Error>
[src]
Set notify_on_release
pub fn set_release_agent(&Self, &str) -> Result<(), Error>
[src]
Set release_agent
pub fn exists(&Self) -> bool
[src]
Does this controller already exist?
pub fn delete(&Self) -> Result<(), Error>
[src]
Delete the controller.
pub fn add_task(&Self, &CgroupPid) -> Result<(), Error>
[src]
Attach a task to this controller.
pub fn add_task_by_tgid(&Self, &CgroupPid) -> Result<(), Error>
[src]
Attach a task to this controller by thread group id.
pub fn tasks(&Self) -> Vec<CgroupPid, Global>
[src]
Get the list of tasks that this controller has.
pub fn v2(&Self) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,