pub struct Abortable(/* private fields */);
Expand description
Abortable trigger wraps an Arc<AtomicBool>
, which can be cloned
to signal task terminating using an atomic bool.
let abortable = Abortable::default();
let result = my_task(abortable).await?;
// ... elsewhere
abortable.abort();
@category General
Implementations§
Trait Implementations§
Source§impl FromWasmAbi for Abortable
impl FromWasmAbi for Abortable
Source§impl IntoWasmAbi for Abortable
impl IntoWasmAbi for Abortable
Source§impl LongRefFromWasmAbi for Abortable
impl LongRefFromWasmAbi for Abortable
Source§impl OptionFromWasmAbi for Abortable
impl OptionFromWasmAbi for Abortable
Source§impl OptionIntoWasmAbi for Abortable
impl OptionIntoWasmAbi for Abortable
Source§impl RefFromWasmAbi for Abortable
impl RefFromWasmAbi for Abortable
Source§impl RefMutFromWasmAbi for Abortable
impl RefMutFromWasmAbi for Abortable
Source§impl TryFromJsValue for Abortable
impl TryFromJsValue for Abortable
Source§impl VectorFromWasmAbi for Abortable
impl VectorFromWasmAbi for Abortable
Source§impl VectorIntoWasmAbi for Abortable
impl VectorIntoWasmAbi for Abortable
impl SupportsConstructor for Abortable
impl SupportsInstanceProperty for Abortable
impl SupportsStaticProperty for Abortable
Auto Trait Implementations§
impl Freeze for Abortable
impl RefUnwindSafe for Abortable
impl Send for Abortable
impl Sync for Abortable
impl Unpin for Abortable
impl UnwindSafe for Abortable
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: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.