#[non_exhaustive]pub enum NodeKind {
Filter {
filter_name: String,
},
SubGraph {
graph: Box<Graph>,
},
Loop {
max_iterations: Option<usize>,
until: LoopCondition,
},
Branch {
arms: Vec<String>,
},
Step {
step_name: String,
},
}Expand description
What kind of computation a node represents.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Filter
A single filter (the common case).
SubGraph
A nested sub-graph (compiled recursively).
Loop
A loop node. Its body is the sub-graph reached through its control
edges; until names what decides to stop.
Fields
max_iterations: Option<usize>Hard cap on iterations; None means the body runs until until
signals stop.
until: LoopConditionDefaults to LoopCondition::BodyTerminal, resolved by the
compiler. Never inferred at runtime from execution order.
Branch
A branch/conditional node. Arms are the labelled control edges
leaving it; arms optionally declares the complete set of labels the
condition may produce, so the compiler can catch a mislabelled edge
before the run rather than at the moment the branch is taken.
Fields
Step
An effectful node: calls models, tools, or other graphs, and decides
what happens next. See crate::step::Step.