pub struct RollbackEngine { /* private fields */ }Expand description
Rollback architecture — per-step undo with verification.
Implementations§
Source§impl RollbackEngine
impl RollbackEngine
pub fn new() -> Self
Sourcepub fn define_action(&mut self, action: RollbackAction) -> WorkflowResult<()>
pub fn define_action(&mut self, action: RollbackAction) -> WorkflowResult<()>
Define a rollback action for a step.
Sourcepub fn get_action(&self, step_id: &str) -> Option<&RollbackAction>
pub fn get_action(&self, step_id: &str) -> Option<&RollbackAction>
Get rollback action for a step.
Sourcepub fn preview(
&self,
scope: &RollbackScope,
completed_step_ids: &[String],
) -> Vec<String>
pub fn preview( &self, scope: &RollbackScope, completed_step_ids: &[String], ) -> Vec<String>
Preview what a rollback would do.
Sourcepub fn execute_rollback(
&mut self,
execution_id: &str,
scope: RollbackScope,
steps_to_rollback: &[String],
) -> WorkflowResult<RollbackReceipt>
pub fn execute_rollback( &mut self, execution_id: &str, scope: RollbackScope, steps_to_rollback: &[String], ) -> WorkflowResult<RollbackReceipt>
Execute rollback and produce a receipt.
Sourcepub fn get_receipts(&self, execution_id: &str) -> Vec<&RollbackReceipt>
pub fn get_receipts(&self, execution_id: &str) -> Vec<&RollbackReceipt>
Get rollback receipts for an execution.
Sourcepub fn list_actions(&self) -> Vec<&RollbackAction>
pub fn list_actions(&self) -> Vec<&RollbackAction>
List all defined rollback actions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RollbackEngine
impl RefUnwindSafe for RollbackEngine
impl Send for RollbackEngine
impl Sync for RollbackEngine
impl Unpin for RollbackEngine
impl UnsafeUnpin for RollbackEngine
impl UnwindSafe for RollbackEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more