pub struct WatchedCgroup {
pub target: CgroupTarget,
/* private fields */
}Expand description
A watched control group between samples: its counters when it was last read.
Fields§
§target: CgroupTargetImplementations§
Source§impl WatchedCgroup
impl WatchedCgroup
pub fn new(target: CgroupTarget) -> Self
Sourcepub fn sample(
&mut self,
dt_s: f64,
devices: &[((u32, u32), String)],
missing: &mut dyn FnMut(&str),
) -> Option<CgroupReading>
pub fn sample( &mut self, dt_s: f64, devices: &[((u32, u32), String)], missing: &mut dyn FnMut(&str), ) -> Option<CgroupReading>
Read the group now and return its reading for the window since
the last read. None for the first window, which has nothing
to take a difference against, and while the group is not there;
missing is called once each time it goes missing.
Auto Trait Implementations§
impl Forget for WatchedCgroup
impl Freeze for WatchedCgroup
impl Move for WatchedCgroup
impl RefUnwindSafe for WatchedCgroup
impl Send for WatchedCgroupwhere
RawVecInner: Send,
impl Sync for WatchedCgroupwhere
RawVecInner: Sync,
impl Unpin for WatchedCgroup
impl UnsafeUnpin for WatchedCgroupwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<CgroupIo>: UnsafeUnpin,
impl UnwindSafe for WatchedCgroupwhere
RawVecInner: UnwindSafe,
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