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,
Build a NodeFn from a closure. The closure receives (&S, &NodeCtx) and returns Future<Output = Result<NodeOut<S>>>.
NodeFn
(&S, &NodeCtx)
Future<Output = Result<NodeOut<S>>>