pub trait RecoveryStrategy {
// Required methods
fn can_handle(&self, error: &DeviceError) -> bool;
fn recover(
&self,
error: &DeviceError,
context: &HashMap<String, String>,
) -> DeviceResult<RecoveryAction>;
}Expand description
Recovery strategy trait
Required Methods§
fn can_handle(&self, error: &DeviceError) -> bool
fn recover( &self, error: &DeviceError, context: &HashMap<String, String>, ) -> DeviceResult<RecoveryAction>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".