pub struct ExitWatch { /* private fields */ }Expand description
The processes of one host to announce when they exit. The front-end
passes ExitWatch::pids to the source
(crate::DataSource::watch_processes), which then keeps them in
snapshots whatever the process limit.
Implementations§
Source§impl ExitWatch
impl ExitWatch
Sourcepub fn toggle(&mut self, process: &ProcessInfo, now_ms: u64) -> bool
pub fn toggle(&mut self, process: &ProcessInfo, now_ms: u64) -> bool
Starts or stops watching process; true when it is now watched.
Sourcepub fn watch_as(
&mut self,
process: &ProcessInfo,
label: Option<&str>,
now_ms: u64,
) -> bool
pub fn watch_as( &mut self, process: &ProcessInfo, label: Option<&str>, now_ms: u64, ) -> bool
Starts watching process unless it is watched already, naming it
label when it exits. True when it was not watched before.
Sourcepub fn state(&self, snapshot: &Snapshot, pid: u32) -> WatchState
pub fn state(&self, snapshot: &Snapshot, pid: u32) -> WatchState
What snapshot says about the watched process pid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExitWatch
impl RefUnwindSafe for ExitWatch
impl Send for ExitWatch
impl Sync for ExitWatch
impl Unpin for ExitWatch
impl UnsafeUnpin for ExitWatch
impl UnwindSafe for ExitWatch
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