#[repr(transparent)]pub struct Pid(_);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.