#[non_exhaustive]pub enum State {
NotStarted,
Pending,
Completed,
TaskPanicked,
CallbackPanicked,
Cancelled,
}Expand description
The state of a Deferred or StaticDeferred task.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotStarted
No task has been started, or its result was taken.
Pending
The task is running.
Completed
The task finished and its result is available.
TaskPanicked
The task panicked. See Deferred::panic_message.
Only reported with the std feature; without it, a panic is not caught.
CallbackPanicked
The task finished but its callback panicked. The result is still available.
See Deferred::panic_message.
Only reported with the std feature; without it, a panic is not caught.
Cancelled
The runtime dropped the task before it finished, for example on shutdown.
Trait Implementations§
impl Copy for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Forget for State
impl Freeze for State
impl Move for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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