pub trait ActionHandler: Send + Sync {
// Required methods
fn execute(
&self,
action: &AutomatedAction,
) -> Result<ActionResult, ActionError>;
fn can_execute(&self, action: &AutomatedAction) -> bool;
fn estimated_time(&self, action: &AutomatedAction) -> Duration;
}Expand description
Action handler trait for automated recovery
Required Methods§
Sourcefn execute(&self, action: &AutomatedAction) -> Result<ActionResult, ActionError>
fn execute(&self, action: &AutomatedAction) -> Result<ActionResult, ActionError>
Execute the automated action
Sourcefn can_execute(&self, action: &AutomatedAction) -> bool
fn can_execute(&self, action: &AutomatedAction) -> bool
Validate if action can be executed
Sourcefn estimated_time(&self, action: &AutomatedAction) -> Duration
fn estimated_time(&self, action: &AutomatedAction) -> Duration
Get estimated execution time