Trait jobsteal::iter::Consumer
[−]
[src]
pub trait Consumer<In: IntoIterator>: Sync { type Item; fn consume<C: Callback<Self::Item>>(&self, i: In, cb: C) -> C::Out; }
A consumer takes an IntoIterator
, which is usually the
Base
of a Spliterator
, produces the desired iterator,
and passes it to the callback given.
Associated Types
type Item
Required Methods
fn consume<C: Callback<Self::Item>>(&self, i: In, cb: C) -> C::Out
Consume the iterator, typically by passing it on to the parent consumer along with a callback which will receive a producer of items to transform.
Implementors
impl<In: IntoIterator, T: Consumer<In>, F: Sync> Consumer<FilterBase<In>> for Filter<T, F> where F: Fn(&T::Item) -> bool
impl<In: IntoIterator, T: Consumer<In>, F, I> Consumer<FlatMapBase<In>> for FlatMap<T, F> where F: Sync + Fn(T::Item) -> I, I: IntoIterator
impl<In: IntoIterator, T, F: Sync, U> Consumer<MapBase<In>> for Map<T, F> where T: Consumer<In>, F: Fn(T::Item) -> U
impl<InA, A, InB, B> Consumer<Hide<Zip<InA, InB>>> for Zip<A, B> where A: Consumer<InA>, B: Consumer<InB>, InA: IntoIterator, InB: IntoIterator
impl<In: IntoIterator> Consumer<In> for ()