Joiner

Trait Joiner 

Source
pub trait Joiner<'a, Input, Output, Error, Context>: Send + Sync {
    // Required method
    fn join(
        &self,
        input: Input,
        context: &'a mut Context,
    ) -> impl Future<Output = Result<NodeOutput<Output>, Error>> + Send;
}
Expand description

The Joiner handles the output of all nodes from ParallelFlow.

Joiners job is to handle the output of all nodes from ParallelFlow and decide how to handle it. At the end it should return an output that can be directly returned by ParallelFlow.

See also ParallelFlow.

Required Methods§

Source

fn join( &self, input: Input, context: &'a mut Context, ) -> impl Future<Output = Result<NodeOutput<Output>, Error>> + Send

Handles the output of all nodes from ParallelFlow.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, Input, Output, Error, Context, T, F> Joiner<'a, Input, Output, Error, Context> for T
where Input: Send, F: Future<Output = Result<NodeOutput<Output>, Error>> + Send + 'a, T: Fn(Input, &'a mut Context) -> F + Send + Sync, Context: 'a,