pub struct AbortHandle { /* private fields */ }Expand description
Cancels a task from anywhere: made by Task::abort_handle, cloned and
sent freely, and it outlives the Task. It keeps the task’s memory, not
its future: an aborted task’s future is dropped where the task runs.
Implementations§
Source§impl AbortHandle
impl AbortHandle
Sourcepub fn abort(&self)
pub fn abort(&self)
Cancels the task unless it completed; see Task::abort.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Whether the task completed or was cancelled.
Trait Implementations§
Source§impl Clone for AbortHandle
impl Clone for AbortHandle
Source§fn clone(&self) -> AbortHandle
fn clone(&self) -> AbortHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AbortHandle
impl RefUnwindSafe for AbortHandle
impl Send for AbortHandle
impl Sync for AbortHandle
impl Unpin for AbortHandle
impl UnsafeUnpin for AbortHandle
impl UnwindSafe for AbortHandle
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