Expand description
Conditional parallel iteration primitives.
When the concurrent feature is enabled, this module re-exports parallel iterator
traits from p3-maybe-rayon backed by rayon. Without concurrent, these traits
fall back to sequential iteration.
Traits§
- From
Parallel Iterator FromParallelIteratorimplements the creation of a collection from aParallelIterator. By implementingFromParallelIteratorfor a given type, you define how it will be created from an iterator.- Indexed
Parallel Iterator - An iterator that supports “random access” to its data, meaning that you can split it at arbitrary indices and draw data from those points.
- Into
Parallel Iterator IntoParallelIteratorimplements the conversion to aParallelIterator.- Into
Parallel RefIterator IntoParallelRefIteratorimplements the conversion to aParallelIterator, providing shared references to the data.- Into
Parallel RefMut Iterator IntoParallelRefMutIteratorimplements the conversion to aParallelIterator, providing mutable references to the data.- Parallel
Bridge - Conversion trait to convert an
Iteratorto aParallelIterator. - Parallel
Drain Full ParallelDrainFullcreates a parallel iterator that moves all items from a collection while retaining the original capacity.- Parallel
Drain Range ParallelDrainRangecreates a parallel iterator that moves a range of items from a collection while retaining the original capacity.- Parallel
Extend ParallelExtendextends an existing collection with items from aParallelIterator.- Parallel
Iterator - Parallel version of the standard iterator trait.
- Parallel
Slice - Parallel extensions for slices.
- Parallel
Slice Mut - Parallel extensions for mutable slices.
- Parallel
String - Parallel extensions for strings.
- Shared
Ext
Functions§
- current_
num_ threads - Returns the number of threads in the current registry. If this code is executing within a Rayon thread pool, then this will be the number of threads for the thread pool of the current thread. Otherwise, it will be the number of threads for the global thread pool.
- join
- Takes two closures and potentially runs them in parallel. It returns a pair of the results from those closures.