pub struct TaskId(/* private fields */);Expand description
Opaque handle for a standalone spawned task.
Opaque handle for a standalone task spawned via spawn().
Implementations§
Source§impl TaskId
impl TaskId
Sourcepub fn cancel(self)
pub fn cancel(self)
Cancel a standalone task. Drops the future immediately, freeing the slab slot. No-op if the task already completed.
Must be called from within the ringline executor (i.e., from a connection task or standalone task). Panics otherwise.
Any pending timers owned by the dropped future are cancelled
via their Drop impl. Stale entries in the ready queue are
silently skipped when the executor encounters them.
Trait Implementations§
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 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