pub trait Node<Context, Action>: Send + Syncwhere
Context: Send + Sync + 'static,
Action: ActionType + Send + Sync + 'static,
Self::Output: Send + Sync + 'static,{
type Output;
// Required methods
fn id(&self) -> NodeId;
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut Context,
) -> Pin<Box<dyn Future<Output = Result<NodeOutcome<Self::Output, Action>, FloxideError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Core trait that all workflow nodes must implement
Required Associated Types§
Required Methods§
Sourcefn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut Context,
) -> Pin<Box<dyn Future<Output = Result<NodeOutcome<Self::Output, Action>, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut Context,
) -> Pin<Box<dyn Future<Output = Result<NodeOutcome<Self::Output, Action>, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process the node asynchronously