pub struct Plan<'a> {
pub name: &'a str,
pub steps: &'a [Step],
pub recovery_handlers: Vec<RecoveryHandler>,
pub max_recoveries: u32,
pub unmount: &'a [String],
pub default_timeout: Duration,
pub default_retry: RetryPolicy,
}Expand description
An ordered sequence of steps toward a single goal, with local recovery handlers.
Plan borrows its steps, name, and unmount list from the owner (typically a
YamlActionPhase). This means phases are never consumed and backward go_to
jumps in flow-control loops just work.
Fields§
§name: &'a strHuman-readable name shown in logs (e.g. "open_file").
steps: &'a [Step]Steps executed in order.
recovery_handlers: Vec<RecoveryHandler>Recovery handlers checked (before global ones) when a step times out.
max_recoveries: u32Maximum number of recovery handler firings across all steps in this plan.
unmount: &'a [String]Anchor names to unmount after the plan finishes (success or failure).
default_timeout: DurationTimeout applied to steps that do not specify their own timeout_secs.
default_retry: RetryPolicyRetry policy applied to steps that do not specify their own retry.
Auto Trait Implementations§
impl<'a> Freeze for Plan<'a>
impl<'a> RefUnwindSafe for Plan<'a>
impl<'a> Send for Plan<'a>
impl<'a> Sync for Plan<'a>
impl<'a> Unpin for Plan<'a>
impl<'a> UnsafeUnpin for Plan<'a>
impl<'a> UnwindSafe for Plan<'a>
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