pub struct Handle { /* private fields */ }Expand description
A handle to a Task that can be used for aborting it.
Implementations§
Source§impl Handle
impl Handle
Sourcepub fn abort_on_drop(self) -> Self
pub fn abort_on_drop(self) -> Self
Returns a new Handle that will call Handle::abort whenever
all of its instances are dropped.
If a Handle is cloned, Handle::abort will only be called
once all of the clones are dropped.
This can be really useful if you do not want to worry about calling
Handle::abort yourself.
Sourcepub fn is_aborted(&self) -> bool
pub fn is_aborted(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handle
impl !RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl !UnwindSafe for Handle
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)