IThreadId

Trait IThreadId 

Source
pub unsafe trait IThreadId:
    Copy
    + Eq
    + Hash
    + Debug
    + Sealed {
    // Required method
    fn current() -> Self;
}
Expand description

Defines methods common to all thread ids.

§Safety

Ids are guaranteed to differ across currently live threads for LiveThreadId, and among all threads that have ever existed for UniqueThreadId and StdThreadId.

Required Methods§

Source

fn current() -> Self

Get the id of the currently executing thread.

May panic if called from a thread destructor.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IThreadId for ThreadId

Available on crate feature std only.
Source§

fn current() -> Self

Implementors§

Source§

impl IThreadId for LiveThreadId

Available on crate feature std only.
Source§

impl IThreadId for StdThreadId

Available on crate feature std only.
Source§

impl IThreadId for UniqueThreadId