pub struct ProcWalker { /* private fields */ }Expand description
State carried between successive ProcWalker::poll calls.
Implementations§
Source§impl ProcWalker
impl ProcWalker
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct an empty walker. The first poll will treat
every existing PID as process.spawned — callers typically discard
the first batch (init-time discovery) and only forward subsequent
deltas to the host.
Sourcepub fn poll(&mut self) -> Vec<ProbeEvent>
pub fn poll(&mut self) -> Vec<ProbeEvent>
Re-scan /proc and produce one ProbeEvent for each PID that
appeared or disappeared since the last call.
Returns events tagged with probe_source::PROCESS_SPAWNED for new
PIDs and probe_source::PROCESS_EXITED for PIDs that were present
last time and aren’t now.
Trait Implementations§
Source§impl Debug for ProcWalker
impl Debug for ProcWalker
Source§impl Default for ProcWalker
impl Default for ProcWalker
Source§fn default() -> ProcWalker
fn default() -> ProcWalker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProcWalker
impl RefUnwindSafe for ProcWalker
impl Send for ProcWalker
impl Sync for ProcWalker
impl Unpin for ProcWalker
impl UnsafeUnpin for ProcWalker
impl UnwindSafe for ProcWalker
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