pub trait Node<C: Context = ()>: Send + Sync {
type Input: Send + Sync;
type Output: Send + Sync;
// Required method
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 C,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Transition<Self::Output>, FloxideError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A node takes an input and a context, and returns a transition.
Required Associated Types§
Required Methods§
Sourcefn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 C,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Transition<Self::Output>, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 C,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Transition<Self::Output>, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process an input value within the given context, producing a transition