pub struct TaskId(/* private fields */);Expand description
Opaque identity of one task submission within the current process.
Use it for cancellation, removal, watched outcomes, and event correlation. An admitted task keeps the same value through every attempt and terminal cleanup. Controller rejection also keeps the submitted value even though no task body runs.
Display writes # followed by the numeric value.
Do not parse that output; use get.
Numeric order records allocation order only.
Implementations§
Trait Implementations§
impl Copy for TaskId
impl Eq for TaskId
Source§impl From<TaskId> for TaskTarget
impl From<TaskId> for TaskTarget
Source§impl Ord for TaskId
impl Ord for TaskId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for TaskId
impl PartialOrd for TaskId
impl StructuralPartialEq for TaskId
Auto Trait Implementations§
impl Freeze for TaskId
impl RefUnwindSafe for TaskId
impl Send for TaskId
impl Sync for TaskId
impl Unpin for TaskId
impl UnsafeUnpin for TaskId
impl UnwindSafe for TaskId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more