pub trait ParallelMapIter<I, V, F, T>where
Self: AtomicIterator<AtomicItem = V> + Send + Sized,
F: Fn(V) -> T + Send + Sync,
V: Send + Sync,
T: Send + Sync,{
// Provided method
fn map(self, f: F) -> ParallelMap<V, F, T, Self> { ... }
}Expand description
ParallelMapIter allows calling the .map(f) on type implementing AtomicIterator to get a ParallelMap object on which collect may be called.
use parallel_task::prelude::*;
let res = (0..100_000).collect::<Vec<i32>>().parallel_iter().map(|val|*val).collect::<Vec<i32>>();
assert_eq!(res.len(),100_000)Provided Methods§
fn map(self, f: F) -> ParallelMap<V, F, T, Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.