Module graph

Source
Expand description

Contains the main definitions for the node graph model.

Structs§

Graph
The graph, containing nodes, input parameters and output parameters. Because graphs are full of self-referential structures, this type uses the slotmap crate to represent all the inner references in the data.
InputParam
An input parameter. Input parameters are inside a node, and represent data that this node receives. Unlike their OutputParam counterparts, input parameters also display an inline widget which allows setting its “value”. The DataType generic parameter is used to restrict the range of input connections for this parameter, and the ValueType is use to represent the data for the inline widget (i.e. constant) value.
Node
A node inside the Graph. Nodes have input and output parameters, stored as ids. They also contain a custom NodeData struct with whatever data the user wants to store per-node.
OutputParam
An output parameter. Output parameters are inside a node, and represent the data that the node produces. Output parameters can be linked to the input parameters of other nodes. Unlike an InputParam, output parameters cannot have a constant inline value.

Enums§

InputParamKind
The three kinds of input params. These describe how the graph must behave with respect to inline widgets and connections for this parameter.