pub enum JobStatus {
Queued,
Running,
Completed,
Failed,
Cancelled,
Interrupted,
}Expand description
Where a job is in its lifecycle.
Variants§
Queued
Accepted, not yet started.
Running
Executing.
Completed
Finished with a result.
Failed
Finished with an error and no result.
Cancelled
Stopped by request.
Interrupted
Was running when the daemon last stopped; not resumed automatically.
Implementations§
Source§impl JobStatus
impl JobStatus
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Whether this status is final — nothing further will happen to the job.
Clients poll until this is true. Adding a new non-terminal status is therefore safe, while a new terminal one that is missing from this match leaves callers waiting forever.
Trait Implementations§
impl Copy for JobStatus
Source§impl<'de> Deserialize<'de> for JobStatus
impl<'de> Deserialize<'de> for JobStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for JobStatus
impl StructuralPartialEq for JobStatus
Auto Trait Implementations§
impl Freeze for JobStatus
impl RefUnwindSafe for JobStatus
impl Send for JobStatus
impl Sync for JobStatus
impl Unpin for JobStatus
impl UnsafeUnpin for JobStatus
impl UnwindSafe for JobStatus
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