#[non_exhaustive]pub enum JournalOutcome {
Committed {
new_revision: CaseRevision,
event_ids: Vec<EventId>,
},
Rejected {
rejection: DomainRejection,
},
RevisionConflict {
current_revision: CaseRevision,
},
Failed {
code: String,
},
OutcomeUnknown {
attempt_id: AttemptId,
remote_ref: Option<String>,
reason: String,
},
}Expand description
The persisted outcome of a command.
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.
Committed
The executor committed.
Fields
§
new_revision: CaseRevisionRevision after the commit.
Rejected
The domain refused.
Fields
§
rejection: DomainRejectionThe rejection.
RevisionConflict
The expected revision was stale.
Fields
§
current_revision: CaseRevisionRevision found.
Failed
Execution failed with a stable code and no effect.
OutcomeUnknown
An effect may exist; its result is unknown (I15).
Implementations§
Source§impl JournalOutcome
impl JournalOutcome
Sourcepub fn status(&self) -> CommandJournalStatus
pub fn status(&self) -> CommandJournalStatus
The status an entry takes when this outcome is recorded.
Sourcepub fn from_execution_error(
command_id: CommandId,
error: &ExecutionError,
) -> Self
pub fn from_execution_error( command_id: CommandId, error: &ExecutionError, ) -> Self
Maps an execution error to the outcome the journal records for it.
Timeout and OutcomeUnknown become JournalOutcome::OutcomeUnknown
because an effect may exist; every other variant becomes a definite
outcome without effect.
Trait Implementations§
Source§impl Clone for JournalOutcome
impl Clone for JournalOutcome
Source§impl Debug for JournalOutcome
impl Debug for JournalOutcome
Source§impl<'de> Deserialize<'de> for JournalOutcome
impl<'de> Deserialize<'de> for JournalOutcome
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 JournalOutcome
Source§impl PartialEq for JournalOutcome
impl PartialEq for JournalOutcome
Source§impl Serialize for JournalOutcome
impl Serialize for JournalOutcome
impl StructuralPartialEq for JournalOutcome
Auto Trait Implementations§
impl Freeze for JournalOutcome
impl RefUnwindSafe for JournalOutcome
impl Send for JournalOutcome
impl Sync for JournalOutcome
impl Unpin for JournalOutcome
impl UnsafeUnpin for JournalOutcome
impl UnwindSafe for JournalOutcome
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,
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.