[−][src]Trait asparit::IntoParallelIterator
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.
Associated Types
type Iter: ParallelIterator<'a, Item = Self::Item>
The parallel iterator type that will be created.
type Item: Send + 'a
The type of item that the parallel iterator will produce.
Required methods
pub fn into_par_iter(self) -> Self::Iter
Converts self
into a parallel iterator.
Examples
use asparit::*; println!("counting in parallel:"); (0..100) .into_par_iter() .for_each(|i| println!("{}", i)) .exec();
This conversion is often implicit for arguments to methods like zip
.
use asparit::*; let v: Vec<_> = (0..5).into_par_iter().zip(5..10).collect().exec(); assert_eq!(v, [(0, 5), (1, 6), (2, 7), (3, 8), (4, 9)]);
Implementations on Foreign Types
impl<'a, I> IntoParallelIterator<'a> for BinaryHeap<I> where
I: Send + 'a,
[src]
I: Send + 'a,
type Iter = <Vec<I> as IntoParallelIterator<'a>>::Iter
type Item = I
pub fn into_par_iter(self) -> Self::Iter
[src]
impl<'a, I> IntoParallelIterator<'a> for &'a BinaryHeap<I> where
I: Send + Sync + 'a,
[src]
I: Send + Sync + 'a,
type Iter = <Vec<&'a I> as IntoParallelIterator<'a>>::Iter
type Item = &'a I
pub fn into_par_iter(self) -> Self::Iter
[src]
impl<'a, I, S> IntoParallelIterator<'a> for HashSet<I, S> where
I: Send + 'a,
S: BuildHasher,
[src]
I: Send + 'a,
S: BuildHasher,
type Iter = <Vec<I> as IntoParallelIterator<'a>>::Iter
type Item = I
pub fn into_par_iter(self) -> Self::Iter
[src]
impl<'a, I, S> IntoParallelIterator<'a> for &'a HashSet<I, S> where
I: Send + Sync + 'a,
S: BuildHasher,
[src]
I: Send + Sync + 'a,
S: BuildHasher,
type Iter = <Vec<&'a I> as IntoParallelIterator<'a>>::Iter
type Item = &'a I
pub fn into_par_iter(self) -> Self::Iter
[src]
impl<'a, T> IntoParallelIterator<'a> for Range<T> where
Iter<T>: ParallelIterator<'a>,
[src]
Iter<T>: ParallelIterator<'a>,
type Item = <Iter<T> as ParallelIterator<'a>>::Item
type Iter = Iter<T>
pub fn into_par_iter(self) -> Self::Iter
[src]
impl<'a, T> IntoParallelIterator<'a> for &'a [T] where
T: Send + Sync,
[src]
T: Send + Sync,
impl<'a, T> IntoParallelIterator<'a> for &'a mut [T] where
T: Send + Sync,
[src]
T: Send + Sync,
impl<'a, T> IntoParallelIterator<'a> for &'a Vec<T> where
T: Send + Sync,
[src]
T: Send + Sync,
impl<'a, T> IntoParallelIterator<'a> for &'a mut Vec<T> where
T: Send + Sync,
[src]
T: Send + Sync,
impl<'a, T> IntoParallelIterator<'a> for Vec<T> where
T: Send + 'a,
[src]
Loading content...T: Send + 'a,
Implementors
impl<'a, T> IntoParallelIterator<'a> for T where
T: ParallelIterator<'a>,
[src]
T: ParallelIterator<'a>,