Struct workflow_core::abortable::Abortable
source · pub struct Abortable(_);
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();
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
Auto Trait Implementations§
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere T: IntoWasmAbi,
§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
.