pub struct Pid(/* private fields */);
Available on crate feature
process
only.Expand description
pid_t
—A non-zero Unix process ID.
This is a pid, and not a pidfd. It is not a file descriptor, and the process it refers to could disappear at any time and be replaced by another, unrelated, process.
Implementations§
source§impl Pid
impl Pid
sourcepub const unsafe fn from_raw_nonzero(raw: RawNonZeroPid) -> Self
pub const unsafe fn from_raw_nonzero(raw: RawNonZeroPid) -> Self
Converts a known non-zero RawPid
into a Pid
.
Safety
raw
must be the value of a valid Unix process ID. It must not be
zero.
sourcepub fn from_child(child: &Child) -> Self
pub fn from_child(child: &Child) -> Self
Creates a Pid
holding the ID of the given child process.
sourcepub const fn as_raw_nonzero(self) -> RawNonZeroPid
pub const fn as_raw_nonzero(self) -> RawNonZeroPid
Converts a Pid
into a RawNonZeroPid
.
Trait Implementations§
impl Copy for Pid
impl Eq for Pid
impl StructuralEq for Pid
impl StructuralPartialEq for Pid
Auto Trait Implementations§
impl RefUnwindSafe for Pid
impl Send for Pid
impl Sync for Pid
impl Unpin for Pid
impl UnwindSafe for Pid
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