Skip to main content

FailureMapper

Trait FailureMapper 

Source
pub trait FailureMapper {
    // Required method
    fn map_route_error(&self, err: &RouteError) -> (FailureClass, RetryClass);
}
Expand description

Failure-class mapping seam.

LifeloopFailureMapper (in failure_mapping.rs) maps RouteError (and downstream stage errors) onto the FailureClass / RetryClass pair carried on a status=failed receipt.

Required Methods§

Source

fn map_route_error(&self, err: &RouteError) -> (FailureClass, RetryClass)

Map a RouteError to a (failure_class, retry_class) pair. Implementations must be deterministic — the same RouteError variant must always map to the same pair so receipt ledgers replay consistently.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§