Trait rayon::par_iter::internal::Producer
[−]
[src]
pub trait Producer: IntoIterator + Send { fn cost(&mut self, len: usize) -> f64; fn split_at(self, index: usize) -> (Self, Self); }
A producer which will produce a fixed number of items N. This is not queryable through the API; the consumer is expected to track it.
Required Methods
fn cost(&mut self, len: usize) -> f64
Cost to produce len
items, where len
must be N
.
fn split_at(self, index: usize) -> (Self, Self)
Split into two producers; one produces items 0..index
, the
other index..N
. Index must be less than N
.
Implementors
impl<P> Producer for EnumerateProducer<P> where P: Producer
impl<'data, T: 'data + Sync> Producer for SliceProducer<'data, T>
impl<'data, T: 'data + Send> Producer for SliceMutProducer<'data, T>
impl<'m, P, MAP_OP, RET> Producer for MapProducer<'m, P, MAP_OP> where P: Producer, MAP_OP: Fn(P::Item) -> RET + Sync, RET: Send
impl<P: Producer> Producer for WeightProducer<P>
impl<A: Producer, B: Producer> Producer for ZipProducer<A, B>
impl Producer for RangeIter<u8>
impl Producer for RangeIter<u16>
impl Producer for RangeIter<u32>
impl Producer for RangeIter<usize>
impl Producer for RangeIter<i8>
impl Producer for RangeIter<i16>
impl Producer for RangeIter<i32>
impl Producer for RangeIter<isize>
impl<'data, T: 'data + Send> Producer for VecProducer<'data, T>