Trait rayon::iter::plumbing::Producer [] [src]

pub trait Producer: Send + Sized {
    type Item;
    type IntoIter: Iterator<Item = Self::Item> + DoubleEndedIterator + ExactSizeIterator;
    fn into_iter(self) -> Self::IntoIter;
fn split_at(self, index: usize) -> (Self, Self); fn min_len(&self) -> usize { ... }
fn max_len(&self) -> usize { ... }
fn fold_with<F>(self, folder: F) -> F
    where
        F: Folder<Self::Item>
, { ... } }

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.

Associated Types

Required Methods

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

Provided Methods

Iterate the producer, feeding each element to folder, and stop when the folder is full (or all elements have been consumed).

The provided implementation is sufficient for most iterables.

Implementors