Expand description
§philiprehberger-parallel
Easy parallel iteration utilities built on top of rayon.
Provides a ParIter extension trait that adds parallel combinators (par_map,
par_filter, par_for_each, etc.) to any IntoIterator, a ParIterWith trait
for custom thread pool configuration, and standalone functions for when you don’t
want to import a trait.
§Quick Start
use philiprehberger_parallel::ParIter;
let squares: Vec<i32> = (0..100).par_map(|x| x * x);
let evens: Vec<i32> = (0..100).par_filter(|x| x % 2 == 0);§With custom configuration
use philiprehberger_parallel::{ParConfig, ParIterWith};
let config = ParConfig::new().threads(4);
let results: Vec<i32> = (0..100).par_map_with(&config, |x| x * x);Structs§
- ParConfig
- Configuration for parallel operations.
Traits§
- ParIter
- Extension trait that adds parallel combinators to any
IntoIterator. - ParIter
With - Extension trait that adds parallel combinators with custom configuration.
Functions§
- par_
chunks - Process items in parallel chunks.
- par_
filter - Filter items in parallel, preserving input order.
- par_
for_ each - Execute a function on each item in parallel.
- par_map
- Apply a function to each item in parallel, returning results in input order.
- par_
map_ results - Apply a fallible function in parallel, collecting all results or all errors.