pub enum DecayJobState {
Pending,
InProgress,
Completed {
result_memory_id: Option<MemoryId>,
},
Failed {
reason: String,
},
Cancelled,
}Expand description
Lifecycle state of a decay job. The terminal states (Completed,
Failed, Cancelled) are observable but no longer subject to scheduling.
The discriminator returned by DecayJobState::state_wire matches the
SQLite CHECK (state IN ('pending', ...)) constraint.
Variants§
Pending
Scheduled but not yet picked up by the worker.
InProgress
Worker has claimed the job and is processing it.
Completed
Worker finished successfully. result_memory_id is set when the
kind produced a durable summary memory; it is None for
ExpiredPrincipleReview jobs that only opened a ceremony.
Failed
Worker observed a refusal or store error. reason is the operator-
visible explanation; it MUST NOT be empty.
Cancelled
Operator cancelled the job before it ran (or before it completed).
Implementations§
Source§impl DecayJobState
impl DecayJobState
Sourcepub const fn state_wire(&self) -> &'static str
pub const fn state_wire(&self) -> &'static str
SQLite wire discriminator for the state column.
Sourcepub const fn is_terminal(&self) -> bool
pub const fn is_terminal(&self) -> bool
True if the state is terminal (no further transitions are expected).
Sourcepub const fn is_scheduling_eligible(&self) -> bool
pub const fn is_scheduling_eligible(&self) -> bool
True if the state is eligible to be picked up by a worker.
Trait Implementations§
Source§impl Clone for DecayJobState
impl Clone for DecayJobState
Source§fn clone(&self) -> DecayJobState
fn clone(&self) -> DecayJobState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecayJobState
impl Debug for DecayJobState
Source§impl<'de> Deserialize<'de> for DecayJobState
impl<'de> Deserialize<'de> for DecayJobState
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>,
Source§impl PartialEq for DecayJobState
impl PartialEq for DecayJobState
Source§fn eq(&self, other: &DecayJobState) -> bool
fn eq(&self, other: &DecayJobState) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DecayJobState
impl Serialize for DecayJobState
impl Eq for DecayJobState
impl StructuralPartialEq for DecayJobState
Auto Trait Implementations§
impl Freeze for DecayJobState
impl RefUnwindSafe for DecayJobState
impl Send for DecayJobState
impl Sync for DecayJobState
impl Unpin for DecayJobState
impl UnsafeUnpin for DecayJobState
impl UnwindSafe for DecayJobState
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
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§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
key and return true if they are equal.