Skip to main content

node_fn

Function node_fn 

Source
pub fn node_fn<S, F, Fut>(name: impl Into<String>, f: F) -> NodeFn<S, F>
where S: GraphState, F: Fn(&S, &NodeCtx<'_>) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<NodeOut<S>>> + Send,
Expand description

Build a NodeFn from a closure. The closure receives (&S, &NodeCtx) and returns Future<Output = Result<NodeOut<S>>>.