#[non_exhaustive]pub enum Edit {
Show 16 variants
AddNode {
name: String,
params: Vec<String>,
body: String,
after: Option<String>,
},
RemoveNode {
name: String,
},
RenameNode {
from: String,
to: String,
},
AddBranch {
node: String,
guard: String,
outcome: String,
before: Option<usize>,
},
RemoveBranch {
node: String,
index: usize,
},
MoveBranch {
node: String,
from: usize,
to: usize,
},
SetGuard {
node: String,
index: usize,
guard: String,
},
SetOutcome {
node: String,
index: usize,
outcome: String,
},
SetAnnotation {
on: Declaration,
name: String,
value: Value,
},
RemoveAnnotation {
on: Declaration,
name: String,
},
AddParam {
name: String,
default: Value,
},
RemoveParam {
name: String,
},
AddEvent {
name: String,
},
RemoveEvent {
name: String,
},
AddEntry {
node: String,
},
RemoveEntry {
node: String,
},
}Expand description
A change a builder can make. Text fields hold flow syntax exactly as it
would be typed: a guard is a temple expression, an outcome is a jump, a
value, an ask or ignore, and a body is everything after node name =.
A guard or outcome can’t hold a # comment, which would hide the rest of
the line it lands on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AddNode
Add node name(params) = body after node after, or at the end.
Fields
RemoveNode
Remove a node and its annotations. Jumps to it become errors to fix.
RenameNode
Rename a node and every jump, ask continuation and entry naming it.
AddBranch
Add guard: outcome before branch before, or before else when
None. A node with a single outcome gains a when block, with its
old outcome as else.
Fields
RemoveBranch
Remove branch index of a node’s when.
MoveBranch
Move a branch; else has to stay last.
Fields
SetGuard
Replace a branch’s guard. "else" makes the last branch the else.
SetOutcome
Replace a branch’s outcome. A single-outcome node’s outcome is index 0.
Fields
SetAnnotation
Set @name = value on the flow, a param or a node.
Fields
on: DeclarationThe declaration it sits on.
RemoveAnnotation
Remove @name from the flow, a param or a node.
AddParam
Add param name = default after the other params.
RemoveParam
Remove a param and its annotations.
AddEvent
Declare an event.
RemoveEvent
Remove an event from events.
AddEntry
List a node under entry.
RemoveEntry
Remove a node from entry.