pub trait Node: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 AgentState,
config: &'life2 GraphConfig,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn name(&self) -> Option<&str> { ... }
}Expand description
A node in the agent graph. Nodes perform actions and can modify the shared state.
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 AgentState,
config: &'life2 GraphConfig,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 AgentState,
config: &'life2 GraphConfig,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute this node
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".