Node

Trait Node 

Source
pub trait Node: Send + Sync {
    // Required methods
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 mut GraphState,
        event_tx: EventSender,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn node_type(&self) -> NodeType;
}
Expand description

Core abstraction for a unit of computation in the graph

Required Methods§

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 mut GraphState, event_tx: EventSender, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute the node’s logic, potentially modifying state and emitting events

Source

fn node_type(&self) -> NodeType

Return the type of this node

Implementors§