Struct pals::ProcList [−][src]
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>ⓘ
[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
Auto Trait Implementations
impl RefUnwindSafe for ProcList
[src]
impl Send for ProcList
[src]
impl Sync for ProcList
[src]
impl Unpin for ProcList
[src]
impl UnwindSafe for ProcList
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.