pub enum Status {
Pending,
Running,
Completed,
Dead,
Cancelled,
}Expand description
Job lifecycle status.
| Variant | Meaning |
|---|---|
Pending | Waiting to be picked up by a worker |
Running | Currently being executed |
Completed | Finished successfully |
Dead | Exhausted all retry attempts |
Cancelled | Cancelled before execution via Enqueuer::cancel |
Variants§
Pending
Waiting to be picked up by a worker.
Running
Currently being executed.
Completed
Finished successfully.
Dead
Exhausted all retry attempts; will not be retried.
Cancelled
Cancelled before execution.
Implementations§
Source§impl Status
impl Status
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Returns the lowercase string representation of this status.
Sourcepub fn from_str(s: &str) -> Option<Self>
pub fn from_str(s: &str) -> Option<Self>
Parses a status from its lowercase string representation.
Returns None for unknown strings.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true for statuses that are final: Completed, Dead, or
Cancelled.
Trait Implementations§
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.