ParallelForEachIter

Trait ParallelForEachIter 

Source
pub trait ParallelForEachIter<I, V, F>
where Self: AtomicIterator<AtomicItem = V> + Send + Sized, F: Fn(V) + Send + Sync, V: Send + Sync,
{ // Provided method fn for_each(self, f: F) { ... } }
Expand description

ParallelForEachIter allows calling the .for_each(f) to run a Fn function on type implementing AtomicIterator

use parallel_task::prelude::*;
 
(0..100_000).collect::<Vec<i32>>().parallel_iter().for_each(|val|{ print!(" {}",val);});
assert_eq!(1,1)

Provided Methods§

Source

fn for_each(self, f: F)

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.

Implementors§

Source§

impl<I, V, F> ParallelForEachIter<I, V, F> for I
where I: AtomicIterator<AtomicItem = V> + Send + Sized, F: Fn(V) + Send + Sync, V: Send + Sync,