Skip to main content

build_node

Function build_node 

Source
pub fn build_node(
    ctx: &BuildContext,
    func: &str,
    wires: &[WireRef],
    wire_types: &[PortType],
    consts: &[ConstArg],
) -> Result<Box<dyn PolydatNode>, String>
Expand description

Build the node func takes for the given wires, their types, and constant arguments, through the registry; an unknown function or a mismatched signature is an error naming it. ctx reaches the factory unchanged.

Every node is built here, and built by the factory whose signatures list func (registry::factories): the parameters’ declared constraints are checked, then the factory’s validate, then its build.