Trait rayon::par_iter::ExactParallelIterator [] [src]

pub trait ExactParallelIterator: BoundedParallelIterator {
    fn len(&mut self) -> usize;

    fn collect_into(self, target: &mut Vec<Self::Item>) { ... }
}

A trait for parallel iterators items where the precise number of items is known. This occurs when e.g. iterating over a vector. Knowing precisely how many items will be produced is very useful.

Required Methods

Produces an exact count of how many items this iterator will produce, presuming no panic occurs.

Provided Methods

Collects the results of the iterator into the specified vector. The vector is always truncated before execution begins. If possible, reusing the vector across calls can lead to better performance since it reuses the same backing buffer.

Implementors