pub trait Node: Debug {
type Input;
type Output;
// Required method
fn process<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, AnchorChainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Represents a node that can process an input to produce an output.
The Node trait defines a generic processing operation with a
specified input and output type. Implementors of this trait can be
composed together to form a processing chain.
Required Associated Types§
Required Methods§
Sourcefn process<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, AnchorChainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, AnchorChainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Asynchronously processes the given input, returning the output. When chained together the output type of one node must match the input of the next node in the chain.