pub trait StepRecoveryController: Send + Sync {
// Required methods
fn classify<'a>(
&'a self,
db: &'a Database,
step: &'a CheckedExecutionStep,
) -> RecoveryFuture<'a, Result<StepRecoveryDecision>>;
fn record_event<'a>(
&'a self,
event: StepRecoveryEvent,
) -> RecoveryFuture<'a, Result<()>>;
}Expand description
External-ledger classification and durable event boundary.
classify is invoked before every checked step. It may inspect db to
reconcile schema state or apply an operation-specific strategy. Returning
StepRecoveryDecision::Indeterminate is the required fail-closed answer
whenever the outcome cannot be proven.
Required Methods§
Sourcefn classify<'a>(
&'a self,
db: &'a Database,
step: &'a CheckedExecutionStep,
) -> RecoveryFuture<'a, Result<StepRecoveryDecision>>
fn classify<'a>( &'a self, db: &'a Database, step: &'a CheckedExecutionStep, ) -> RecoveryFuture<'a, Result<StepRecoveryDecision>>
Classify a checked step before any transaction for it is opened.
Sourcefn record_event<'a>(
&'a self,
event: StepRecoveryEvent,
) -> RecoveryFuture<'a, Result<()>>
fn record_event<'a>( &'a self, event: StepRecoveryEvent, ) -> RecoveryFuture<'a, Result<()>>
Persist or otherwise handle a typed commit-boundary event.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".