pub enum Step {
Call(Call),
Branch {
arms: Vec<Arm>,
},
Loop {
label: String,
body: Vec<Step>,
},
Optional {
label: String,
body: Vec<Step>,
},
Parallel {
arms: Vec<Arm>,
},
Return(Exit),
}Expand description
One node of a Flow.
Variants§
Call(Call)
A call. Rendered as a message arrow. Calls nested in receivers and arguments appear as separate, earlier steps (evaluation order).
Branch
Mutually exclusive arms (if/else if/else, match).
Rendered as alt / else.
Fields
Loop
A loop (for, while, loop, iterator adaptors with closures).
Rendered as loop.
Optional
A block that may not run (if without else, if let, closures
passed to map/and_then). Rendered as opt.
Parallel
Concurrent arms (join!, select!, spawned tasks).
Rendered as par / and.
Return(Exit)
An explicit early exit (return, ? propagation, break out of a
labelled loop). Rendered as a note or a reply arrow.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Step
impl<'de> Deserialize<'de> for Step
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Step
impl StructuralPartialEq for Step
Auto Trait Implementations§
impl Freeze for Step
impl RefUnwindSafe for Step
impl Send for Step
impl Sync for Step
impl Unpin for Step
impl UnsafeUnpin for Step
impl UnwindSafe for Step
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