pub struct TestManager {
pub apply_called: RefCell<bool>,
/* private fields */
}Fields§
§apply_called: RefCell<bool>Implementations§
Source§impl TestManager
impl TestManager
pub fn get_add_task_args(&self) -> Vec<Pid>
pub fn apply_called(&self) -> bool
Trait Implementations§
Source§impl CgroupManager for TestManager
impl CgroupManager for TestManager
type Error = Infallible
Source§fn add_task(&self, pid: Pid) -> Result<(), Infallible>
fn add_task(&self, pid: Pid) -> Result<(), Infallible>
Adds a task specified by its pid to the cgroup
Source§fn apply(&self, _controller_opt: &ControllerOpt<'_>) -> Result<(), Infallible>
fn apply(&self, _controller_opt: &ControllerOpt<'_>) -> Result<(), Infallible>
Applies resource restrictions to the cgroup
Source§fn freeze(&self, _state: FreezerState) -> Result<(), Infallible>
fn freeze(&self, _state: FreezerState) -> Result<(), Infallible>
Sets the freezer cgroup to the specified state
Source§fn get_all_pids(&self) -> Result<Vec<Pid>, Infallible>
fn get_all_pids(&self) -> Result<Vec<Pid>, Infallible>
Gets the PIDs inside the cgroup
Source§impl Debug for TestManager
impl Debug for TestManager
Auto Trait Implementations§
impl !Freeze for TestManager
impl !RefUnwindSafe for TestManager
impl Send for TestManager
impl !Sync for TestManager
impl Unpin for TestManager
impl UnwindSafe for TestManager
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