pub enum TaskStatus {
Pending,
Ready,
Started,
Succeeded,
Failed,
Cancelled,
}
Expand description
All valid statuses for tasks.
Variants§
Pending
The task is not yet ready to run.
Ready
The task is waiting for a worker.
Started
The task is currently running.
Succeeded
The task finished successfully.
Failed
The task failed.
Cancelled
The task was cancelled.
Implementations§
Source§impl TaskStatus
impl TaskStatus
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Return whether the status is considered final, as in there is no possible other status value to change to under normal circumstances.
In other words a task is finished if either:
- it succeeded
- it failed
- it was cancelled
Trait Implementations§
Source§impl Clone for TaskStatus
impl Clone for TaskStatus
Source§fn clone(&self) -> TaskStatus
fn clone(&self) -> TaskStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TaskStatus
impl Debug for TaskStatus
Source§impl FromStr for TaskStatus
impl FromStr for TaskStatus
Source§impl Hash for TaskStatus
impl Hash for TaskStatus
Source§impl PartialEq for TaskStatus
impl PartialEq for TaskStatus
impl Copy for TaskStatus
impl Eq for TaskStatus
impl StructuralPartialEq for TaskStatus
Auto Trait Implementations§
impl Freeze for TaskStatus
impl RefUnwindSafe for TaskStatus
impl Send for TaskStatus
impl Sync for TaskStatus
impl Unpin for TaskStatus
impl UnwindSafe for TaskStatus
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