minion_engine/control_flow.rs
1use crate::steps::StepOutput;
2
3/// Control flow exceptions (like Roast's skip!/break!/fail!)
4#[derive(Debug)]
5pub enum ControlFlow {
6 /// Skip the current step without error
7 Skip { message: String },
8
9 /// Fail the step and potentially abort
10 Fail { message: String },
11
12 /// Exit the current repeat/map loop
13 Break {
14 message: String,
15 value: Option<StepOutput>,
16 },
17
18 /// Skip to next iteration of repeat/map
19 Next { message: String },
20}