pub trait Node<S: State>: Send + Sync {
// Required method
fn process<'life0, 'async_trait>(
&'life0 self,
state: S,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput<S>, SynapticError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A node in the graph that processes state.
Nodes return NodeOutput<S> which is either a state update
or a Command for dynamic control flow.
For backwards compatibility, returning Ok(state.into()) works
via the From<S> for NodeOutput<S> impl.