Skip to main content

BaseNode

Trait BaseNode 

Source
pub trait BaseNode<State, Deps = (), End = ()>: Send + Sync {
    // Required method
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 mut GraphRunContext<State, Deps>,
    ) -> Pin<Box<dyn Future<Output = GraphResult<NodeResult<State, Deps, End>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn type_name(&self) -> &'static str { ... }
    fn name(&self) -> &str { ... }
}
Expand description

Base trait for all graph nodes.

Required Methods§

Source

fn run<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 mut GraphRunContext<State, Deps>, ) -> Pin<Box<dyn Future<Output = GraphResult<NodeResult<State, Deps, End>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute this node.

Provided Methods§

Source

fn type_name(&self) -> &'static str

Get the node type name for debugging.

Source

fn name(&self) -> &str

Get a human-readable name for this node.

Implementors§