#[repr(transparent)]pub struct Pid(_);
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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more