pub struct Process<'a>(/* private fields */);Expand description
A process running on this machine.
Because the OS owns the process this “refers” to, we can’t know it’s valid:
someone could’ve killed it. Therefore, the methods return NotFound if
they are ever called on a dead process.
Implementations§
Source§impl Process<'_>
impl Process<'_>
Sourcepub fn current() -> Process<'static>
pub fn current() -> Process<'static>
Get the currently running process
Note that this is will last for 'static, since the OS process it
refers to contains this very struct, and if it died, then this struct
must have died with it.
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> UnsafeUnpin 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