pub struct FlowGraph {
pub name: String,
pub target: FlowTarget,
pub workgroup_size: Option<u32>,
pub inputs: Vec<FlowInput>,
pub nodes: Vec<FlowNode>,
pub outputs: Vec<FlowOutput>,
pub topo_order: Vec<usize>,
pub steps: Vec<FlowStep>,
pub chains: Vec<FlowChain>,
pub uses: Vec<FlowUse>,
}Expand description
A parsed @flow block — the DAG intermediate representation
Fields§
§name: StringName of the flow (referenced by CSS flow: name)
target: FlowTargetTarget pipeline: fragment shader or compute shader
workgroup_size: Option<u32>Workgroup size for compute flows (default: 64)
inputs: Vec<FlowInput>Input declarations (builtins, buffers, CSS properties)
nodes: Vec<FlowNode>Processing nodes (the DAG vertices)
outputs: Vec<FlowOutput>Output declarations (what the flow produces)
topo_order: Vec<usize>Cached topological order (node indices, set after validation)
steps: Vec<FlowStep>Semantic step declarations (expanded to nodes during validation)
chains: Vec<FlowChain>Chain declarations (desugared to steps, then expanded to nodes)
uses: Vec<FlowUse>Composition imports (inlined during validation)
Implementations§
Source§impl FlowGraph
impl FlowGraph
Sourcepub fn validate(
&mut self,
flow_registry: Option<&HashMap<String, FlowGraph>>,
) -> Result<(), Vec<FlowError>>
pub fn validate( &mut self, flow_registry: Option<&HashMap<String, FlowGraph>>, ) -> Result<(), Vec<FlowError>>
Validate the flow graph: detect cycles, check types, resolve references.
On success, populates topo_order with node indices in dependency order.
On failure, returns all errors found.
Pass a flow registry for use resolution. Pass None for standalone validation.