pub struct Processes { /* private fields */ }Expand description
A forward enumeration of the target’s process table.
Entries are produced lazily. This matters on Linux, where the per-process
cost is a pair of /proc reads, so a search that stops early does not pay
for the whole table.
Implementations§
Source§impl Processes
impl Processes
Sourcepub async fn next_entry(&mut self) -> Result<Option<ProcessInfo>>
pub async fn next_entry(&mut self) -> Result<Option<ProcessInfo>>
Returns the next process, or None once the table is exhausted.
Processes that exit partway through enumeration are skipped rather than reported as errors: the table is a moving target on every platform, and a caller cannot act on the difference.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Processes
impl !UnwindSafe for Processes
impl Freeze for Processes
impl Send for Processes
impl Sync for Processes
impl Unpin for Processes
impl UnsafeUnpin for Processes
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more