pub trait ThreadIdProvider {
type Id: PartialEq + Eq + Copy;
// Required method
fn current_thread_id() -> Self::Id;
}Expand description
Trait which abstract what the thread ID is and how it can be obtained.
Required Associated Types§
Required Methods§
Sourcefn current_thread_id() -> Self::Id
fn current_thread_id() -> Self::Id
Get the thread id of the current running thread.
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.
Implementors§
Source§impl ThreadIdProvider for StdThreadIdProvider
Available on non-crate feature no-std only.
impl ThreadIdProvider for StdThreadIdProvider
Available on non-crate feature
no-std only.