pub struct Process<'a> { /* private fields */ }
Expand description
Represent linux process.
Implementations§
Source§impl<'a> Process<'a>
impl<'a> Process<'a>
Sourcepub fn thread_count(&self) -> Result<i32>
pub fn thread_count(&self) -> Result<i32>
Returns process thread count.
Sourcepub fn get_thread(&self, pid: Pid) -> Result<Thread<'_>>
pub fn get_thread(&self, pid: Pid) -> Result<Thread<'_>>
Returns process thread with lwpid == pid.
If thread not exists returns generic TdErr::Err
(unfortunately this behavior is set in thread_db impl).
Sourcepub fn collect_threads(&self) -> Result<Vec<Thread<'_>>>
pub fn collect_threads(&self) -> Result<Vec<Thread<'_>>>
Returns all process threads.
Sourcepub fn enable_stats(&mut self, enable: bool) -> Result<()>
pub fn enable_stats(&mut self, enable: bool) -> Result<()>
Enable collecting statistics for process associated with TA. ! This function not implemented in glibc.
Sourcepub fn reset_stats(&mut self) -> Result<()>
pub fn reset_stats(&mut self) -> Result<()>
Reset statistics. ! This function not implemented in glibc.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Process<'a>
impl<'a> RefUnwindSafe for Process<'a>
impl<'a> !Send for Process<'a>
impl<'a> !Sync for Process<'a>
impl<'a> Unpin for Process<'a>
impl<'a> UnwindSafe for Process<'a>
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