pub enum CommandJournalStatus {
Pending,
AwaitingConfirmation,
Executing,
Committed,
Failed,
OutcomeUnknown,
}Expand description
Lifecycle status of a journal entry.
Variants§
Pending
Admitted, not yet handed to the executor.
AwaitingConfirmation
Journaled for a confirmation card; runs only once that card is confirmed, and crash recovery never resumes it.
Executing
Handed to the executor.
Committed
The executor committed; the outcome is Committed.
Failed
The command ended without effect or with a definite failure.
OutcomeUnknown
An effect may exist and its result is unknown; reconcile, never retry blindly (I15).
Implementations§
Source§impl CommandJournalStatus
impl CommandJournalStatus
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Returns true for Committed and Failed.
Sourcepub fn is_pending(self) -> bool
pub fn is_pending(self) -> bool
Returns true for Pending and Executing: the entry must be resumed
after a crash.
Sourcepub fn can_transition(from: Self, to: Self) -> bool
pub fn can_transition(from: Self, to: Self) -> bool
Legal transitions.
Trait Implementations§
Source§impl Clone for CommandJournalStatus
impl Clone for CommandJournalStatus
impl Copy for CommandJournalStatus
Source§impl Debug for CommandJournalStatus
impl Debug for CommandJournalStatus
Source§impl<'de> Deserialize<'de> for CommandJournalStatus
impl<'de> Deserialize<'de> for CommandJournalStatus
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 CommandJournalStatus
Source§impl Hash for CommandJournalStatus
impl Hash for CommandJournalStatus
Source§impl Ord for CommandJournalStatus
impl Ord for CommandJournalStatus
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 PartialEq for CommandJournalStatus
impl PartialEq for CommandJournalStatus
Source§impl PartialOrd for CommandJournalStatus
impl PartialOrd for CommandJournalStatus
Source§impl Serialize for CommandJournalStatus
impl Serialize for CommandJournalStatus
impl StructuralPartialEq for CommandJournalStatus
Auto Trait Implementations§
impl Freeze for CommandJournalStatus
impl RefUnwindSafe for CommandJournalStatus
impl Send for CommandJournalStatus
impl Sync for CommandJournalStatus
impl Unpin for CommandJournalStatus
impl UnsafeUnpin for CommandJournalStatus
impl UnwindSafe for CommandJournalStatus
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.