pub struct Phase<S> {
pub name: &'static str,
pub forward: ForwardStep<S>,
pub rollback: RollbackStep<S>,
}Expand description
A single phase of the transactional apply pipeline.
The forward step is the work done while applying; if it returns Err,
the pipeline aborts and rolls back ALREADY-APPLIED phases in reverse.
The rollback closure is invoked only if the forward step previously
succeeded.
This is a pure data type — the executor lives in
apply_phases_with_rollback and is unit-tested independently of any
real subsystem.
Fields§
§name: &'static strHuman-readable name for log/error messages.
forward: ForwardStep<S>Apply step. Borrows the shared state mutably.
rollback: RollbackStep<S>Rollback step. Only invoked if forward succeeded.
Auto Trait Implementations§
impl<S> Freeze for Phase<S>
impl<S> !RefUnwindSafe for Phase<S>
impl<S> Send for Phase<S>
impl<S> !Sync for Phase<S>
impl<S> Unpin for Phase<S>
impl<S> UnsafeUnpin for Phase<S>
impl<S> !UnwindSafe for Phase<S>
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