pub struct Plan {
pub order: Vec<String>,
pub ops: BTreeMap<String, String>,
pub inputs: BTreeMap<String, BTreeMap<String, Endpoint>>,
pub params: BTreeMap<String, BTreeMap<String, ParamValue>>,
pub forwards: BTreeMap<String, BTreeMap<String, Endpoint>>,
pub sources: BTreeSet<String>,
pub outputs: BTreeMap<String, Endpoint>,
pub margin: Margin,
pub readers: BTreeMap<Endpoint, usize>,
}Expand description
A checked graph, ready to run.
Fields§
§order: Vec<String>The nodes to run, in order: only those that lead to an output.
ops: BTreeMap<String, String>Each node’s operation id.
inputs: BTreeMap<String, BTreeMap<String, Endpoint>>Each node’s connected inputs: port → what feeds it.
params: BTreeMap<String, BTreeMap<String, ParamValue>>Each node’s parameters, checked, defaults filled.
forwards: BTreeMap<String, BTreeMap<String, Endpoint>>Disabled nodes: each output port → the input it passes on.
sources: BTreeSet<String>The sources the run reads.
outputs: BTreeMap<String, Endpoint>What is written: name → endpoint.
margin: MarginThe margin every source is read with: what the ops need, added along each path to an output.
readers: BTreeMap<Endpoint, usize>How many times each endpoint is read (by nodes and outputs): the engine drops a value after its last reader.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn margin_with(
&self,
own: impl Fn(&str, &str, &BTreeMap<String, ParamValue>) -> Margin,
) -> Margin
pub fn margin_with( &self, own: impl Fn(&str, &str, &BTreeMap<String, ParamValue>) -> Margin, ) -> Margin
The margin the sources must be read with when each node’s own margin is own(node, op, params): from the outputs back, each node adds its own to what its readers need; two
branches take the larger. A check fills Plan::margin with the ops’ declared margins; an
engine whose ops look further at some parameters (a blur’s sigma) asks them here.