pub enum EffectViolation {
DeclarationMismatch {
kind: String,
marker: Effect,
declared: Effect,
},
MissingIdempotencyKey {
kind: String,
},
MissingCompensation {
kind: String,
},
MissingApproval {
kind: String,
effect_id: EffectId,
},
ApprovalScopeMismatch {
kind: String,
required: EffectId,
presented: EffectId,
},
}Expand description
Why the kernel refused an admission decision.
A dedicated error type (not crate::error::RustyError) because these
are contract violations surfaced by the typed API, not runtime execution
failures; the executor maps them into its own error path when the
enforcement wave lands.
Variants§
DeclarationMismatch
The marker trait and TypedEffect::EFFECT disagree — a type-level
bug, caught at the enforcement point rather than trusted.
Fields
MissingIdempotencyKey
An IdempotentEffect presented for retry admission without the
idempotency key the declaration is meaningless without.
MissingCompensation
A CompensatableEffect with no rollback handler registered for its
kind.
MissingApproval
An IrreversibleEffect presented for execution with no approval
token at all.
Fields
ApprovalScopeMismatch
A token was presented, but it approves a different effect id — an approval is scoped to exactly one effect occurrence and is not transferable.
Trait Implementations§
Source§impl Clone for EffectViolation
impl Clone for EffectViolation
Source§fn clone(&self) -> EffectViolation
fn clone(&self) -> EffectViolation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EffectViolation
impl Debug for EffectViolation
Source§impl Display for EffectViolation
impl Display for EffectViolation
impl Eq for EffectViolation
Source§impl Error for EffectViolation
impl Error for EffectViolation
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()