pub struct ComponentTask { /* private fields */ }Expand description
A handle for observing or cancelling background work.
Dropping the handle does not cancel the task. Scope retirement, Pump shutdown, or an explicit
cancel call cancels it.
Implementations§
Source§impl ComponentTask
impl ComponentTask
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns whether this task has been cancelled.
Sourcepub fn status(&self) -> ComponentTaskStatus
pub fn status(&self) -> ComponentTaskStatus
Returns the current scheduling and delivery state.
Trait Implementations§
Source§impl Clone for ComponentTask
impl Clone for ComponentTask
Source§fn clone(&self) -> ComponentTask
fn clone(&self) -> ComponentTask
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 ComponentTask
impl RefUnwindSafe for ComponentTask
impl Send for ComponentTask
impl Sync for ComponentTask
impl Unpin for ComponentTask
impl UnsafeUnpin for ComponentTask
impl UnwindSafe for ComponentTask
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