Trait rayon::par_iter::internal::Producer [] [src]

pub trait Producer: IntoIterator + Send + Sized {
    fn cost(&mut self, len: usize) -> f64;
    fn split_at(self, index: usize) -> (Self, Self);

    fn weighted(&self) -> bool { ... }
}

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

Cost to produce len items, where len must be N.

Split into two producers; one produces items 0..index, the other index..N. Index must be less than N.

Provided Methods

Reports whether the producer has explicit weights.

Implementors