#[non_exhaustive]pub enum FaultDecision {
Retry {
ordinal: RetryOrdinal,
delay: Duration,
},
Skip {
disposition: RollbackDisposition,
},
FailAndRollback,
Unknown,
Stop,
}Expand description
The authoritative policy outcome for one fault.
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.
Retry
Roll back, reserve ordinal durably, wait delay, then re-invoke.
Fields
§
ordinal: RetryOrdinalThe retry ordinal to reserve.
Skip
Record one committed skip with the accepted disposition.
Fields
§
disposition: RollbackDispositionHow the failed unit is separated from committed work.
FailAndRollback
Roll back and fail the step.
Unknown
The commit outcome is unknown and must never be guessed.
Stop
Cooperative stop governs the outcome.
Implementations§
Source§impl FaultDecision
impl FaultDecision
Sourcepub const fn is_retry(self) -> bool
pub const fn is_retry(self) -> bool
Returns whether the decision re-invokes the failed component.
Sourcepub const fn skip_disposition(self) -> Option<RollbackDisposition>
pub const fn skip_disposition(self) -> Option<RollbackDisposition>
Returns the accepted skip disposition, when the decision skips.
Trait Implementations§
Source§impl Clone for FaultDecision
impl Clone for FaultDecision
Source§fn clone(&self) -> FaultDecision
fn clone(&self) -> FaultDecision
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FaultDecision
Source§impl Debug for FaultDecision
impl Debug for FaultDecision
impl Eq for FaultDecision
Source§impl Hash for FaultDecision
impl Hash for FaultDecision
Source§impl PartialEq for FaultDecision
impl PartialEq for FaultDecision
impl StructuralPartialEq for FaultDecision
Auto Trait Implementations§
impl Freeze for FaultDecision
impl RefUnwindSafe for FaultDecision
impl Send for FaultDecision
impl Sync for FaultDecision
impl Unpin for FaultDecision
impl UnsafeUnpin for FaultDecision
impl UnwindSafe for FaultDecision
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