pub struct TaskId(/* private fields */);Expand description
A unique identifier for a task in the runtime.
Tasks are units of concurrent execution owned by regions.
Implementations§
Source§impl TaskId
impl TaskId
Sourcepub const fn from_arena(index: ArenaIndex) -> TaskId
pub const fn from_arena(index: ArenaIndex) -> TaskId
Creates a new task ID from an arena index (internal use).
Sourcepub const fn arena_index(self) -> ArenaIndex
pub const fn arena_index(self) -> ArenaIndex
Returns the underlying arena index (internal use).
Sourcepub fn new_ephemeral() -> TaskId
pub fn new_ephemeral() -> TaskId
Creates a new ephemeral task ID for request-scoped contexts created outside the runtime scheduler.
Trait Implementations§
Source§impl Ord for TaskId
impl Ord for TaskId
Source§impl PartialOrd for TaskId
impl PartialOrd for TaskId
impl Copy for TaskId
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).