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§
Sourcefn can_recover(&self, error: &MemScopeError) -> bool
fn can_recover(&self, error: &MemScopeError) -> bool
Determine if an error can be recovered from
Sourcefn get_recovery_action(&self, error: &MemScopeError) -> Option<RecoveryAction>
fn get_recovery_action(&self, error: &MemScopeError) -> Option<RecoveryAction>
Get the recovery action for an error
Sourcefn execute_recovery(&self, action: &RecoveryAction) -> Result<()>
fn execute_recovery(&self, action: &RecoveryAction) -> Result<()>
Execute recovery action