Struct pals::ProcList[][src]

pub struct ProcList { /* fields omitted */ }

Process list. It can be viewed as a list of process or a list of process trees.

Implementations

impl ProcList[src]

pub fn parent_of(&self, pid: Pid) -> Option<&Process>[src]

Gets parent process' pid of the process the pid of which is given.

pub fn procs(&self) -> impl Iterator<Item = &ProcNode>[src]

Returns all detected running processes.

Examples

.............
.  ProcList .
.   /   \   .
.  1     4  .
. / \   / \ .
.2   3 5   6.
.............

This method will returns #1, #2, #3, #4, #5, #6.

pub fn children<'a, 's: 'a>(&'s self) -> Proc<'a>

Notable traits for Proc<'a>

impl<'a> Iterator for Proc<'a> type Item = Self;
[src]

Returns all detected running process trees.

Examples

.............
.  ProcList .
.   /   \   .
.  1     4  .
. / \   / \ .
.2   3 5   6.
.............

This method will returns #1 and #4.

Use .children() recursively to get descendant processes, e.g. #2.

pub fn bfs<'a, 's: 'a>(&'s self) -> BfsForest<Splitted<Proc<'a>>>[src]

Returns processes in breadth first search. This method helps to convert ProcList into trees::Forest.

See trees for more.

Trait Implementations

impl Debug for ProcList[src]

impl Default for ProcList[src]

impl Display for ProcList[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TupleTree<T, ()> for T[src]