pub struct ProcQuery { /* private fields */ }Expand description
Get information about a process
Implementations§
source§impl ProcQuery
impl ProcQuery
sourcepub fn process_id(self, pid: Pid) -> Self
pub fn process_id(self, pid: Pid) -> Self
Set the process ID to match
Either this function or process_id_from_child are required to be called before the query is usable.
sourcepub fn process_id_from_child(self, child: &Child) -> Self
pub fn process_id_from_child(self, child: &Child) -> Self
Get the process ID of a child process
Either this function or process_id are required to be called before the query is usable.
sourcepub fn expect_min_num_children(self, num_children: usize) -> Self
pub fn expect_min_num_children(self, num_children: usize) -> Self
Require at least num_children children to have been started by the matched process for the query to succeed.
sourcepub fn children(&self) -> ProcCtlResult<Vec<ProcInfo>>
pub fn children(&self) -> ProcCtlResult<Vec<ProcInfo>>
Find the children of the selected process
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ProcQuery
impl Send for ProcQuery
impl Sync for ProcQuery
impl Unpin for ProcQuery
impl UnwindSafe for ProcQuery
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