Skip to main content

Parallelizable

Trait Parallelizable 

Source
pub trait Parallelizable: ConcurrentIterable {
    // Provided method
    fn par(&self) -> ParIter<Self::Iter, Id<Self::Item>> { ... }
}
Expand description

Adds .par() to concurrent iterables.

Sequential counterpart: creating and using a regular iterator via iter() or into_iter().

Provided Methods§

Source

fn par(&self) -> ParIter<Self::Iter, Id<Self::Item>>

Returns a parallel iterator over items of this iterable.

§Example
use orx_parallel::*;

let sum: usize = (0..10).par().sum();
assert_eq!(sum, 45);

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§