pub struct ProcList { /* private fields */ }Expand description
Process list. It can be viewed as a list of process or a list of process trees.
Implementations§
Source§impl ProcList
impl ProcList
Sourcepub fn parent_of(&self, pid: Pid) -> Option<&Process>
pub fn parent_of(&self, pid: Pid) -> Option<&Process>
Gets parent process’ pid of the process the pid of which is given.
Sourcepub fn procs(&self) -> impl Iterator<Item = &ProcNode>
pub fn procs(&self) -> impl Iterator<Item = &ProcNode>
Returns all detected running processes.
§Examples
.............
. ProcList .
. / \ .
. 1 4 .
. / \ / \ .
.2 3 5 6.
.............This method will returns #1, #2, #3, #4, #5, #6.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProcList
impl RefUnwindSafe for ProcList
impl Send for ProcList
impl Sync for ProcList
impl Unpin for ProcList
impl UnwindSafe for ProcList
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