Skip to main content

StepRecoveryController

Trait StepRecoveryController 

Source
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§

Source

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.

Source

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".

Implementors§