pub enum TaskState {
Pending,
Running,
Completed,
Cancelled,
Failed,
}Expand description
Execution state of an asynchronous task.
Variants§
Pending
Task has been created but is waiting to be scheduled.
Running
Task is currently executing on a CPU.
Completed
Task has finished successfully.
Cancelled
Task was cancelled before completion.
Failed
Task encountered an error during execution.
Implementations§
Source§impl TaskState
impl TaskState
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if this state is terminal (the task will not run again).
Trait Implementations§
impl Copy for TaskState
impl Eq for TaskState
impl StructuralPartialEq for TaskState
Auto Trait Implementations§
impl Freeze for TaskState
impl RefUnwindSafe for TaskState
impl Send for TaskState
impl Sync for TaskState
impl Unpin for TaskState
impl UnwindSafe for TaskState
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)