Skip to main content

CompensatableEffect

Trait CompensatableEffect 

Source
pub trait CompensatableEffect: TypedEffect { }
Expand description

Marker: repeating the call duplicates the effect, but a declared compensating action can logically undo it — charge/refund (wire class Effect::Compensatable).

The compensation is not optional coloring: admit_compensatable requires a rollback handler registered for the effect’s kind before the effect may execute, and returns that handler so the caller holds the undo path from the start. Automatic compensation remains out of scope (unchanged from R0.6: Compensatable fails closed in the untyped retry path) — the handler is invoked by policy, not by the kernel.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§