Struct xmz_server::prelude::thread::ThreadId 1.19.0[−][src]
pub struct 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);
Trait Implementations
impl Clone for ThreadId
[src]
impl Clone for ThreadId
fn clone(&self) -> ThreadId
[src]
fn clone(&self) -> ThreadId
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Hash for ThreadId
[src]
impl Hash for ThreadId
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl Eq for ThreadId
[src]
impl Eq for ThreadId
impl Copy for ThreadId
[src]
impl Copy for ThreadId
impl Debug for ThreadId
[src]
impl Debug for ThreadId
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl PartialEq<ThreadId> for ThreadId
[src]
impl PartialEq<ThreadId> for ThreadId