Skip to main content

Node

Trait Node 

Source
pub trait Node: Send + Sync {
    // Required method
    fn forward(&self, input: &Value, ctx: &Ctx<'_>) -> Result<Value, NodeError>;
}
Expand description

Something a node knows how to do. Send + Sync because a Python Graph is a pyclass — which PyO3 requires to be Send — and it carries the catalog.

Required Methods§

Source

fn forward(&self, input: &Value, ctx: &Ctx<'_>) -> Result<Value, NodeError>

Runs it. input is what arrived along the edges. It runs to the end: whatever it takes happens inside, and the engine neither counts nor bounds it.

Implementors§