pub struct Tid(/* private fields */);Expand description
Identifiant kernel d’un thread (TID, tid_t).
Sur Linux, chaque thread possède un TID distinct. Le TID du thread
principal d’un processus est égal au PID du processus (invariant
gettid() == getpid() pour le thread principal).
Type distinct de Pid : on ne peut pas confondre les deux par
inadvertance.
Implementations§
Source§impl Tid
impl Tid
Sourcepub const fn from_nonzero(raw: NonZeroI32) -> Self
pub const fn from_nonzero(raw: NonZeroI32) -> Self
Construit un Tid à partir d’une valeur déjà validée.
Sourcepub const fn try_from_raw(raw: i32) -> Option<Self>
pub const fn try_from_raw(raw: i32) -> Option<Self>
Tente de construire un Tid à partir d’un i32 brut.
Retourne None si la valeur est négative ou nulle.
Trait Implementations§
impl Copy for Tid
impl Eq for Tid
Source§impl Ord for Tid
impl Ord for Tid
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Tid
impl PartialOrd for Tid
impl StructuralPartialEq for Tid
Auto Trait Implementations§
impl Freeze for Tid
impl RefUnwindSafe for Tid
impl Send for Tid
impl Sync for Tid
impl Unpin for Tid
impl UnsafeUnpin for Tid
impl UnwindSafe for Tid
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