Struct script::task::CancellableTask
source · pub struct CancellableTask<T: TaskOnce> {
cancelled: Arc<AtomicBool>,
inner: T,
}
Expand description
A task that can be cancelled by toggling a shared flag.
Fields§
§cancelled: Arc<AtomicBool>
§inner: T
Implementations§
source§impl<T> CancellableTask<T>where
T: TaskOnce,
impl<T> CancellableTask<T>where
T: TaskOnce,
fn is_cancelled(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for CancellableTask<T>where
T: RefUnwindSafe,
impl<T> Send for CancellableTask<T>
impl<T> Sync for CancellableTask<T>where
T: Sync,
impl<T> Unpin for CancellableTask<T>where
T: Unpin,
impl<T> UnwindSafe for CancellableTask<T>where
T: UnwindSafe,
Blanket Implementations§
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> 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> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert