Trait Node

Source
pub trait Node<Context, Action>: Send + Sync
where 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§

Source

type Output

The output type produced by this node

Required Methods§

Source

fn id(&self) -> NodeId

Get the unique identifier for this node

Source

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

Implementors§

Source§

impl<Context, ItemType, A> Node<Context, A> for BatchNode<Context, ItemType, A>
where Context: BatchContext<ItemType> + Clone + Send + Sync + 'static, ItemType: Clone + Send + Sync + 'static, A: ActionType + Default + Debug + Clone + Send + Sync + 'static,

Source§

impl<LN, Context, Action> Node<Context, Action> for LifecycleNodeAdapter<LN, Context, Action>
where LN: LifecycleNode<Context, Action> + Send + Sync + 'static, Context: Send + Sync + 'static, Action: ActionType + Send + Sync + 'static, LN::ExecOutput: Send + Sync + 'static,

Source§

type Output = <LN as LifecycleNode<Context, Action>>::ExecOutput

Source§

impl<N, Context, A> Node<Context, A> for RetryNode<N, Context, A>
where N: Node<Context, A> + Debug + Send + Sync, Context: Debug + Send + Sync + 'static, A: ActionType + Default + Debug + Send + Sync + 'static, N::Output: Clone + Send + Sync + 'static,

Source§

type Output = <N as Node<Context, A>>::Output