pub enum OnAmbiguous {
Skip,
Fail,
Rerun,
}Expand description
What to do when a guarded step resumes inside the ambiguous window.
The ambiguous window is the gap between committing the EffectIntent and committing the
StepResult: on resume the journal proves the effect was about to fire, but not whether it
did. The policy resolves that uncertainty. Every resolution emits a mandatory structured audit
record (FR-DE-10).
§Examples
use zeph_durable::OnAmbiguous;
assert_eq!(OnAmbiguous::Skip.as_str(), "skip");Variants§
Skip
Assume the effect happened. Safe for cost-bearing / boundary-idempotent effects, where the external service deduplicates the re-issued operation by its idempotency key, so re-running the closure cannot double-apply the effect (it is deduplicated at the boundary).
Fail
Surface the ambiguity to the operator with DurableError::AmbiguousEffect. The required
choice for destructive and security-relevant effects, where guessing is unacceptable.
Rerun
Assume the effect did not happen and re-run the closure. For effects misclassified as guarded that are in fact safe to repeat.
Implementations§
Trait Implementations§
Source§impl Clone for OnAmbiguous
impl Clone for OnAmbiguous
Source§fn clone(&self) -> OnAmbiguous
fn clone(&self) -> OnAmbiguous
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OnAmbiguous
Source§impl Debug for OnAmbiguous
impl Debug for OnAmbiguous
impl Eq for OnAmbiguous
Source§impl Hash for OnAmbiguous
impl Hash for OnAmbiguous
Source§impl PartialEq for OnAmbiguous
impl PartialEq for OnAmbiguous
impl StructuralPartialEq for OnAmbiguous
Auto Trait Implementations§
impl Freeze for OnAmbiguous
impl RefUnwindSafe for OnAmbiguous
impl Send for OnAmbiguous
impl Sync for OnAmbiguous
impl Unpin for OnAmbiguous
impl UnsafeUnpin for OnAmbiguous
impl UnwindSafe for OnAmbiguous
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more