intuicio_nodes::nodes

Trait NodeGraphVisitor

Source
pub trait NodeGraphVisitor<T: NodeDefinition> {
    type Input;
    type Output;

    // Required methods
    fn visit_statement(
        &mut self,
        node: &Node<T>,
        inputs: HashMap<String, Self::Input>,
        scopes: HashMap<String, Vec<Self::Output>>,
        result: &mut Vec<Self::Output>,
    ) -> bool;
    fn visit_expression(
        &mut self,
        node: &Node<T>,
        inputs: HashMap<String, Self::Input>,
    ) -> Option<Self::Input>;
}

Required Associated Types§

Required Methods§

Source

fn visit_statement( &mut self, node: &Node<T>, inputs: HashMap<String, Self::Input>, scopes: HashMap<String, Vec<Self::Output>>, result: &mut Vec<Self::Output>, ) -> bool

Source

fn visit_expression( &mut self, node: &Node<T>, inputs: HashMap<String, Self::Input>, ) -> Option<Self::Input>

Implementors§