1.19.0[−][src]Struct std::thread::ThreadId
A unique identifier for a running thread.
A ThreadId
is an opaque object that has a unique value for each thread
that creates one. ThreadId
s are not guaranteed to correspond to a thread's
system-designated identifier. A ThreadId
can be retrieved from the id
method on a Thread
.
Examples
use std::thread; let other_thread = thread::spawn(|| { thread::current().id() }); let other_thread_id = other_thread.join().unwrap(); assert!(thread::current().id() != other_thread_id);Run
Trait Implementations
impl PartialEq<ThreadId> for ThreadId
[src]
impl Eq for ThreadId
[src]
impl Hash for ThreadId
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Debug for ThreadId
[src]
impl Copy for ThreadId
[src]
impl Clone for ThreadId
[src]
Auto Trait Implementations
impl UnwindSafe for ThreadId
impl RefUnwindSafe for ThreadId
impl Unpin for ThreadId
impl Send for ThreadId
impl Sync for ThreadId
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut F
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,