pub trait ConditionalEdge<S: StateSchema>: Send + Sync {
// Required method
fn route<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<String, GraphError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Conditional routing function trait
Routing functions examine the state and return a string key that maps to the next node via the edge’s target map.
Required Methods§
Sourcefn route<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<String, GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn route<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<String, GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Route to next node based on state
Returns a string key that matches entries in the edge’s targets map.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".