Skip to main content

Module effect

Module effect 

Source
Expand description

The per-step side-effect contract.

EffectClass declares how a step’s side effect behaves under replay. It is the foundation of the exactly-once machinery: the replay cursor uses it to decide whether a journaled result may be returned without re-running the operation.

For EffectClass::ExactlyOnceGuarded steps the contract is sharper: an EffectIntentSubClass further classifies what kind of side effect the step performs, and an OnAmbiguous policy decides what to do when a crash leaves the journal in the ambiguous window — an EffectIntent committed, but no StepResult, so it is unknown whether the external effect actually fired. The combination is enforced at construction time (crate::StepDescriptor): a destructive, security-relevant, money-moving, or custom guarded step that omits an explicit OnAmbiguous is rejected with DurableError::AmbiguityPolicyRequired, forcing the safety decision to the call site rather than a silent runtime default (FR-DE-09).

Enums§

EffectClass
How a step’s side effect behaves under replay.
EffectIntentSubClass
What an EffectClass::ExactlyOnceGuarded step actually does, refining the ambiguity policy.
OnAmbiguous
What to do when a guarded step resumes inside the ambiguous window.