pub trait UnindexedConsumer<I>: Consumer<I> {
    // Required methods
    fn split_off_left(&self) -> Self;
    fn to_reducer(&self) -> Self::Reducer;
}
Expand description

A stateless consumer can be freely copied. These consumers can be used like regular consumers, but they also support a split_off_left method that does not take an index to split, but simply splits at some arbitrary point (for_each, for example, produces an unindexed consumer).

Required Methods§

source

fn split_off_left(&self) -> Self

Splits off a “left” consumer and returns it. The self consumer should then be used to consume the “right” portion of the data. (The ordering matters for methods like find_first – values produced by the returned value are given precedence over values produced by self.) Once the left and right halves have been fully consumed, you should reduce the results with the result of to_reducer.

source

fn to_reducer(&self) -> Self::Reducer

Creates a reducer that can be used to combine the results from a split consumer.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl UnindexedConsumer<char> for ListStringConsumer

source§

impl<'a, T, C> UnindexedConsumer<&'a T> for ClonedConsumer<C>
where C: UnindexedConsumer<T>, T: 'a + Clone,

source§

impl<'a, T, C> UnindexedConsumer<&'a T> for CopiedConsumer<C>
where C: UnindexedConsumer<T>, T: 'a + Copy,

source§

impl<'a, T, C> UnindexedConsumer<T> for PanicFuseConsumer<'a, C>
where C: UnindexedConsumer<T>,

source§

impl<'a, T, OP, CA, CB> UnindexedConsumer<T> for UnzipConsumer<'a, OP, CA, CB>
where OP: UnzipOp<T>, CA: UnindexedConsumer<OP::Left>, CB: UnindexedConsumer<OP::Right>,

source§

impl<'c, T: Send + 'c> UnindexedConsumer<T> for CollectConsumer<'c, T>

Pretend to be unindexed for special_collect_into_vec, but we should never actually get used that way…

source§

impl<'f, F, T> UnindexedConsumer<T> for ForEachConsumer<'f, F>
where F: Fn(T) + Sync,

source§

impl<'f, T, C> UnindexedConsumer<Option<T>> for WhileSomeConsumer<'f, C>
where C: UnindexedConsumer<T>, T: Send,

source§

impl<'f, T, C> UnindexedConsumer<T> for SkipAnyConsumer<'f, C>
where C: UnindexedConsumer<T>, T: Send,

source§

impl<'f, T, C> UnindexedConsumer<T> for TakeAnyConsumer<'f, C>
where C: UnindexedConsumer<T>, T: Send,

source§

impl<'f, T, C, F> UnindexedConsumer<T> for InspectConsumer<'f, C, F>
where C: UnindexedConsumer<T>, F: Fn(&T) + Sync,

source§

impl<'f, T, C, F> UnindexedConsumer<T> for UpdateConsumer<'f, C, F>
where C: UnindexedConsumer<T>, F: Fn(&mut T) + Send + Sync,

source§

impl<'f, T, INIT, U, R, C, F> UnindexedConsumer<T> for MapInitConsumer<'f, C, INIT, F>
where C: UnindexedConsumer<R>, INIT: Fn() -> U + Sync, F: Fn(&mut U, T) -> R + Sync, R: Send,

source§

impl<'f, T, R, C, F> UnindexedConsumer<T> for MapConsumer<'f, C, F>
where C: UnindexedConsumer<F::Output>, F: Fn(T) -> R + Sync, R: Send,

source§

impl<'f, T, U, C, F> UnindexedConsumer<T> for FlatMapConsumer<'f, C, F>
where C: UnindexedConsumer<U::Item>, F: Fn(T) -> U + Sync, U: IntoParallelIterator,

source§

impl<'f, T, U, C, F> UnindexedConsumer<T> for FlatMapIterConsumer<'f, C, F>
where C: UnindexedConsumer<U::Item>, F: Fn(T) -> U + Sync, U: IntoIterator,

source§

impl<'f, T, U, R, C, F> UnindexedConsumer<T> for MapWithConsumer<'f, C, U, F>
where C: UnindexedConsumer<R>, U: Send + Clone, F: Fn(&mut U, T) -> R + Sync, R: Send,

source§

impl<'p, T, C, P> UnindexedConsumer<T> for FilterConsumer<'p, C, P>
where C: UnindexedConsumer<T>, P: Fn(&T) -> bool + Sync + 'p,

source§

impl<'p, T, C, P> UnindexedConsumer<T> for SkipAnyWhileConsumer<'p, C, P>
where C: UnindexedConsumer<T>, P: Fn(&T) -> bool + Sync,

source§

impl<'p, T, C, P> UnindexedConsumer<T> for TakeAnyWhileConsumer<'p, C, P>
where C: UnindexedConsumer<T>, P: Fn(&T) -> bool + Sync,

source§

impl<'p, T, P> UnindexedConsumer<T> for rayon::iter::find::FindConsumer<'p, P>
where T: Send, P: Fn(&T) -> bool + Sync + 'p,

source§

impl<'p, T, P> UnindexedConsumer<T> for rayon::iter::find_first_last::FindConsumer<'p, P>
where T: Send, P: Fn(&T) -> bool + Sync,

source§

impl<'p, T, U, C, P> UnindexedConsumer<T> for FilterMapConsumer<'p, C, P>
where C: UnindexedConsumer<U>, P: Fn(T) -> Option<U> + Sync + 'p,

source§

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

source§

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

source§

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

source§

impl<'r, U, T, C, F> UnindexedConsumer<T> for FoldWithConsumer<'r, C, U, F>
where C: UnindexedConsumer<U>, F: Fn(U, T) -> U + Sync, U: Send + Clone,

source§

impl<'r, U, T, C, F> UnindexedConsumer<T> for TryFoldWithConsumer<'r, C, U, F>
where C: UnindexedConsumer<U>, F: Fn(U::Output, T) -> U + Sync, U: Try + Send, U::Output: Clone + Send,

source§

impl<'r, U, T, C, ID, F> UnindexedConsumer<T> for FoldConsumer<'r, C, ID, F>
where C: UnindexedConsumer<U>, F: Fn(U, T) -> U + Sync, ID: Fn() -> U + Sync, U: Send,

source§

impl<'r, U, T, C, ID, F> UnindexedConsumer<T> for TryFoldConsumer<'r, U, C, ID, F>
where C: UnindexedConsumer<U>, F: Fn(U::Output, T) -> U + Sync, ID: Fn() -> U::Output + Sync, U: Try + Send,

source§

impl<C, T> UnindexedConsumer<T> for IntersperseConsumer<C, T>
where C: UnindexedConsumer<T>, T: Clone + Send,

source§

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

source§

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

source§

impl<T> UnindexedConsumer<T> for NoopConsumer

source§

impl<T, C> UnindexedConsumer<T> for FlattenConsumer<C>

source§

impl<T, C> UnindexedConsumer<T> for FlattenIterConsumer<C>

source§

impl<T: Send> UnindexedConsumer<T> for ListConsumer

source§

impl<T: Send> UnindexedConsumer<T> for ListVecConsumer