pub enum TaskState {
Pending,
Running,
Completed,
Failed,
}Expand description
Task execution state.
Variants§
Pending
Task is waiting to be executed.
Running
Task is currently executing.
Completed
Task completed successfully.
Failed
Task failed (error or panic).
Implementations§
Source§impl TaskState
impl TaskState
Sourcepub const fn is_pending(&self) -> bool
pub const fn is_pending(&self) -> bool
Check if the task is still pending.
Sourcepub const fn is_finished(&self) -> bool
pub const fn is_finished(&self) -> bool
Check if the task has finished (completed or failed).
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 UnsafeUnpin for TaskState
impl UnwindSafe for TaskState
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