pub trait GraphNode<S: StateSchema>:
Send
+ Sync
+ 'static {
// Required methods
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S,
config: Option<NodeConfig>,
) -> Pin<Box<dyn Future<Output = Result<StateUpdate<S>, GraphError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn name(&self) -> &str;
}Expand description
Graph Node trait
Nodes are async functions that take a state and return a state update. They represent the work units in the graph.
Required Methods§
Sourcefn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S,
config: Option<NodeConfig>,
) -> Pin<Box<dyn Future<Output = Result<StateUpdate<S>, GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S,
config: Option<NodeConfig>,
) -> Pin<Box<dyn Future<Output = Result<StateUpdate<S>, GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".