RecoveryStrategy

pub trait RecoveryStrategy: Debug {
    // Required methods
    fn recover_from_fault<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        fault: &'life1 Fault,
        system_state: &'life2 SystemState,
    ) -> Pin<Box<dyn Future<Output = Result<RecoveryResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn estimate_recovery_time(&self, fault: &Fault) -> Duration;
    fn calculate_recovery_cost(&self, fault: &Fault) -> f64;
}
Expand description

Trait for recovery strategies

Required Methods§

Source

fn recover_from_fault<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, fault: &'life1 Fault, system_state: &'life2 SystemState, ) -> Pin<Box<dyn Future<Output = Result<RecoveryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn estimate_recovery_time(&self, fault: &Fault) -> Duration

Source

fn calculate_recovery_cost(&self, fault: &Fault) -> f64

Implementors§