pub enum EffectClass {
Idempotent,
AtLeastOnce,
ExactlyOnceGuarded,
}Expand description
How a step’s side effect behaves under replay.
This classification is recorded with every step result so the replay cursor can reason about re-execution safety without inspecting the payload.
§Examples
use zeph_durable::EffectClass;
// A pure or naturally-idempotent step is safe to skip on replay.
assert_eq!(EffectClass::Idempotent.as_str(), "idempotent");Variants§
Idempotent
The operation is pure or naturally idempotent: a replayed step returns the journaled result and never invokes the operation closure again (INV-10).
AtLeastOnce
The operation tolerates being run more than once. On an ambiguous replay it may be re-run without correctness loss, accepting at-least-once delivery.
ExactlyOnceGuarded
The operation must run exactly once. It is fenced by an crate::IdempotencyKey and an
explicit ambiguity policy; a replayed guarded step never re-fires a committed effect.
Implementations§
Trait Implementations§
Source§impl Clone for EffectClass
impl Clone for EffectClass
Source§fn clone(&self) -> EffectClass
fn clone(&self) -> EffectClass
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 EffectClass
Source§impl Debug for EffectClass
impl Debug for EffectClass
impl Eq for EffectClass
Source§impl Hash for EffectClass
impl Hash for EffectClass
Source§impl PartialEq for EffectClass
impl PartialEq for EffectClass
impl StructuralPartialEq for EffectClass
Auto Trait Implementations§
impl Freeze for EffectClass
impl RefUnwindSafe for EffectClass
impl Send for EffectClass
impl Sync for EffectClass
impl Unpin for EffectClass
impl UnsafeUnpin for EffectClass
impl UnwindSafe for EffectClass
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
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
Compare self to
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> ⓘ
Converts
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> ⓘ
Converts
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