ErrorRecovery

Trait ErrorRecovery 

Source
pub trait ErrorRecovery {
    // Required methods
    fn can_recover(&self, error: &MemScopeError) -> bool;
    fn get_recovery_action(
        &self,
        error: &MemScopeError,
    ) -> Option<RecoveryAction>;
    fn execute_recovery(&self, action: &RecoveryAction) -> Result<()>;
}
Expand description

Error recovery trait for implementing recovery strategies

Required Methods§

Source

fn can_recover(&self, error: &MemScopeError) -> bool

Determine if an error can be recovered from

Source

fn get_recovery_action(&self, error: &MemScopeError) -> Option<RecoveryAction>

Get the recovery action for an error

Source

fn execute_recovery(&self, action: &RecoveryAction) -> Result<()>

Execute recovery action

Implementors§