Trait rayon::iter::plumbing::Reducer

source ·
pub trait Reducer<Result> {
    // Required method
    fn reduce(self, left: Result, right: Result) -> Result;
}
Expand description

The reducer is the final step of a Consumer – after a consumer has been split into two parts, and each of those parts has been fully processed, we are left with two results. The reducer is then used to combine those two results into one. See the plumbing README for further details.

Required Methods§

source

fn reduce(self, left: Result, right: Result) -> Result

Reduce two final results into one; this is executed after a split.

Implementors§

source§

impl Reducer<()> for NoopReducer

source§

impl<'a, T, C> Reducer<T> for PanicFuseReducer<'a, C>
where C: Reducer<T>,

source§

impl<'c, T> Reducer<CollectResult<'c, T>> for CollectReducer

source§

impl<'r, R, ID, T> Reducer<T> for ReduceConsumer<'r, R, ID>
where R: Fn(T, T) -> T + Sync,

source§

impl<'r, R, ID, T> Reducer<T> for TryReduceConsumer<'r, R, ID>
where R: Fn(T::Output, T::Output) -> T + Sync, T: Try,

source§

impl<'r, R, T> Reducer<Option<T>> for TryReduceWithConsumer<'r, R>
where R: Fn(T::Output, T::Output) -> T + Sync, T: Try,

source§

impl<A, B, RA, RB> Reducer<(A, B)> for UnzipReducer<RA, RB>
where RA: Reducer<A>, RB: Reducer<B>,

source§

impl<P> Reducer<P> for ProductConsumer<P>
where P: Send + Product,

source§

impl<S> Reducer<S> for SumConsumer<S>
where S: Send + Sum,

source§

impl<T> Reducer<Option<T>> for rayon::iter::find::FindReducer

source§

impl<T> Reducer<Option<T>> for rayon::iter::find_first_last::FindReducer

source§

impl<T> Reducer<LinkedList<T>> for ListReducer