pub enum EffectIntentSubClass {
CostBearingOrBoundaryIdempotent,
Destructive,
SecurityRelevant,
MoneyMoving,
Custom,
}Expand description
What an EffectClass::ExactlyOnceGuarded step actually does, refining the ambiguity policy.
The sub-class drives the construction-time policy rule: a guarded step whose effect is
destructive, security-relevant, money-moving, or custom MUST carry an explicit OnAmbiguous
(FR-DE-09); only a cost-bearing / boundary-idempotent effect gets a safe default
(OnAmbiguous::Skip). The sub-class is consumed when the descriptor is built and never stored
on the journal row — the persisted classification is the coarser EffectClass.
§Examples
use zeph_durable::EffectIntentSubClass;
// A paid LLM call carrying a provider idempotency header is safe to skip on an ambiguous replay.
assert!(!EffectIntentSubClass::CostBearingOrBoundaryIdempotent.requires_explicit_policy());
// A fund transfer must declare its ambiguity policy explicitly.
assert!(EffectIntentSubClass::MoneyMoving.requires_explicit_policy());Variants§
CostBearingOrBoundaryIdempotent
A paid or rate-limited boundary effect that the external service deduplicates by
idempotency key (e.g. a paid LLM call). Default ambiguity policy: OnAmbiguous::Skip.
Destructive
An irreversible mutation (file delete, record drop). Requires an explicit policy.
SecurityRelevant
A permission or credential mutation. Requires an explicit policy.
MoneyMoving
A financial transfer. Requires an explicit policy.
Custom
A caller-defined effect with no built-in default. Requires an explicit policy.
Implementations§
Source§impl EffectIntentSubClass
impl EffectIntentSubClass
Sourcepub fn requires_explicit_policy(self) -> bool
pub fn requires_explicit_policy(self) -> bool
Whether a guarded step of this sub-class MUST be given an explicit OnAmbiguous policy.
Only EffectIntentSubClass::CostBearingOrBoundaryIdempotent has a safe default; every
other sub-class forces the decision to the call site.
Trait Implementations§
Source§impl Clone for EffectIntentSubClass
impl Clone for EffectIntentSubClass
Source§fn clone(&self) -> EffectIntentSubClass
fn clone(&self) -> EffectIntentSubClass
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 EffectIntentSubClass
Source§impl Debug for EffectIntentSubClass
impl Debug for EffectIntentSubClass
impl Eq for EffectIntentSubClass
Source§impl Hash for EffectIntentSubClass
impl Hash for EffectIntentSubClass
Source§impl PartialEq for EffectIntentSubClass
impl PartialEq for EffectIntentSubClass
impl StructuralPartialEq for EffectIntentSubClass
Auto Trait Implementations§
impl Freeze for EffectIntentSubClass
impl RefUnwindSafe for EffectIntentSubClass
impl Send for EffectIntentSubClass
impl Sync for EffectIntentSubClass
impl Unpin for EffectIntentSubClass
impl UnsafeUnpin for EffectIntentSubClass
impl UnwindSafe for EffectIntentSubClass
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