pub enum LinkSource {
Literal(Value),
Variable(Uuid),
Port(Port),
Select {
source: Box<LinkSource>,
path: Key,
},
}Expand description
Where the value feeding a Link’s target comes from.
Generalizes the behavior tree’s Expression link kinds (a literal value, a
shared blackboard variable, or another node’s slot). Full expression links
(arithmetic over sources) are deferred — proposal Q-D.
Variants§
Literal(Value)
A constant value.
Variable(Uuid)
A shared blackboard variable, by id — the interpreter resolves it to a store slot (or a tree-local cell) at build time.
Port(Port)
Another node’s slot: the output/port the link reads from. Generalizes
Expression::NodeArgument.
Select
Read a Key sub-path of another source’s value on read — a structured
output’s field (by id) or an array element (by index). Selection is an
operation over any source, not a property of one: Select { source: Variable(id), .. } selects into a variable, and nested Selects chain.
The path segments are resolved ids, not names (the type registry
maps authored field names to ids when a graph is built), so the runtime
resolves nothing. See Key::select. Heavier “compute a value”
operations (calls, arithmetic) are nodes, not link sources.
Fields
source: Box<LinkSource>The source whose value is projected.
Trait Implementations§
Source§impl Clone for LinkSource
impl Clone for LinkSource
Source§fn clone(&self) -> LinkSource
fn clone(&self) -> LinkSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more