Enum NodeOutcome
pub enum NodeOutcome {
Produced(Value),
HandOff {
target: String,
carry: Value,
},
Paused {
turn: usize,
reason: SuspendReason,
},
}Expand description
How a node finished.
The three ways execution can leave a node, whichever kind it was. A
filter only ever produces; a step can also hand control on or stop and
wait. The runtime used to carry this as StepOutcome and translate it
three times on the way out — into control flow, then into an error
with the reason flattened to a JSON string that nothing parsed back.
Deliberately not #[non_exhaustive], against the convention for
public enums here. Every consumer of this type is deciding control
flow, and a wildcard arm in that position is a silent wrong answer —
the pattern that let an unhandled plan variant become a successful
no-op. If a fourth way to finish is ever added, the places that must
think about it should stop compiling.
Variants§
Produced(Value)
A value, which the node’s successors read as its output.
HandOff
Control passes to another node, carrying a value.
The carry is stored under the handing node, so the target reads it as an ordinary predecessor output rather than through a special path.
Fields
carry: ValueThe value the target reads as this node’s output.
Paused
The run stopped, pending something outside it. turn is where to
deliver the answer when resuming.