[][src]Trait rayon_logs::prelude::IntoParallelIterator

pub trait IntoParallelIterator: IntoParallelIterator + Sized {
    fn into_par_iter(self) -> Logged<Self::Iter> { ... }
}

IntoParallelIterator implements the conversion to a ParallelIterator.

By implementing IntoParallelIterator for a type, you define how it will transformed into an iterator. This is a parallel version of the standard library's std::iter::IntoIterator trait.

Provided methods

fn into_par_iter(self) -> Logged<Self::Iter>

Converts self into a parallel iterator.

Examples

use rayon::prelude::*;

println!("counting in parallel:");
(0..100).into_par_iter()
    .for_each(|i| println!("{}", i));

This conversion is often implicit for arguments to methods like zip.

use rayon::prelude::*;

let v: Vec<_> = (0..5).into_par_iter().zip(5..10).collect();
assert_eq!(v, [(0, 5), (1, 6), (2, 7), (3, 8), (4, 9)]);
Loading content...

Implementors

impl<I: IntoParallelIterator> IntoParallelIterator for I[src]

Loading content...