#[non_exhaustive]pub enum JobState {
Pending,
Running,
Succeeded,
Failed,
Cancelled,
Conflict,
Skipped,
}Expand description
A job’s state.
§Examples
use stratum_node_core::JobState;
assert!(JobState::Succeeded.is_terminal());
assert!(!JobState::Running.is_terminal());
assert_eq!(JobState::ALL.len(), 7);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.
Pending
Waiting for a lease, perhaps until next_eligible_at.
Running
An attempt holds a current lease.
Succeeded
The job reported created or existing.
Failed
Out of attempts, or a final refusal.
Cancelled
Its lease was revoked, or it was cancelled while pending.
Conflict
The job reported conflict.
Skipped
A later period ran instead.
Implementations§
Trait Implementations§
impl Copy for JobState
Source§impl<'de> Deserialize<'de> for JobState
impl<'de> Deserialize<'de> for JobState
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for JobState
Source§impl Ord for JobState
impl Ord for JobState
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for JobState
impl PartialOrd for JobState
impl StructuralPartialEq for JobState
Auto Trait Implementations§
impl Forget for JobState
impl Freeze for JobState
impl Move for JobState
impl RefUnwindSafe for JobState
impl Send for JobState
impl Sync for JobState
impl Unpin for JobState
impl UnsafeUnpin for JobState
impl UnwindSafe for JobState
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