pub struct ThreadId(/* private fields */);Expand description
A thread registry identity containing a slot and reuse generation.
Implementations§
Source§impl ThreadId
impl ThreadId
Sourcepub const fn from_parts(slot: u32, generation: u32) -> Self
pub const fn from_parts(slot: u32, generation: u32) -> Self
Creates an identifier from a registry slot and generation.
Sourcepub const fn generation(self) -> u32
pub const fn generation(self) -> u32
Returns the slot reuse generation.
Trait Implementations§
impl Copy for ThreadId
impl Eq for ThreadId
Source§impl Ord for ThreadId
impl Ord for ThreadId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ThreadId
impl PartialOrd for ThreadId
impl StructuralPartialEq for ThreadId
Auto Trait Implementations§
impl Freeze for ThreadId
impl RefUnwindSafe for ThreadId
impl Send for ThreadId
impl Sync for ThreadId
impl Unpin for ThreadId
impl UnsafeUnpin for ThreadId
impl UnwindSafe for ThreadId
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