Struct Pid
pub struct Pid(/* private field */);
Process identifier
Newtype pattern around pid_t (which is just alias). It prevents bugs caused by accidentally
passing wrong value.
Implementations
impl Pid
const fn from_raw(pid: pid_t) -> SelfCreates
Pidfrom rawpid_t.fn this() -> SelfReturns PID of calling process
fn parent() -> SelfReturns PID of parent of calling process
const fn as_raw(self) -> pid_tGet the raw
pid_twrapped byself.
Trait Implementations
impl Clone for Pid
fn clone(&self) -> Self
impl Copy for Pid
impl Debug for Pid
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for Pid
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Pid
impl Hash for Pid
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for Pid
fn cmp(&self, other: &Self) -> Ordering
impl PartialEq for Pid
fn eq(&self, other: &Self) -> bool
impl PartialOrd for Pid
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
impl StructuralPartialEq for Pid
Auto Trait Implementations
impl Freeze for Pid
impl RefUnwindSafe for Pid
impl Send for Pid
impl Sync for Pid
impl Unpin for Pid
impl UnsafeUnpin for Pid
impl UnwindSafe for Pid
Blanket Implementations
impl<T> Any for Pid
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Pid
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Pid
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Pid
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Pid
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Pid
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for Pid
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for Pid
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Pid
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Pid
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>