Struct Id
struct Id(_)
An opaque ID that uniquely identifies a task relative to all other currently running tasks.
Notes
- Task IDs are unique relative to other currently running tasks. When a task completes, the same ID may be used for another task.
- Task IDs are not sequential, and do not indicate the order in which tasks are spawned, what runtime a task is spawned on, or any other data.
- The task ID of the currently running task can be obtained from inside the
task via the
task::try_id()andtask::id()functions and from outside the task via theJoinHandle::id()function.
Implementations
impl Clone for Id
fn clone(self: &Self) -> Id
impl Copy for Id
impl Debug for Id
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Display for Id
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Id
impl Freeze for Id
impl Hash for Id
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl PartialEq for Id
fn eq(self: &Self, other: &Id) -> bool
impl RefUnwindSafe for Id
impl Send for Id
impl StructuralPartialEq for Id
impl Sync for Id
impl Unpin for Id
impl UnsafeUnpin for Id
impl UnwindSafe for Id
impl<T> Any for Id
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Id
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Id
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Id
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Id
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Id
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for Id
fn to_string(self: &Self) -> String
impl<T, U> Into for Id
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Id
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Id
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>