pub trait IntoStatefulThreadedIterator: IntoIterator {
// Provided method
fn stateful_par_map<F, FO, S>(
self,
func: F,
state: S,
) -> ThreadedStatefulIterator<Self::IntoIter, <Self as IntoIterator>::Item, FO> ⓘ
where Self: Sized,
<Self as IntoIterator>::Item: Send + 'static,
F: Fn(&mut S, <Self as IntoIterator>::Item) -> FO + Send + Copy + 'static,
FO: Send + 'static,
S: Send + Clone + 'static { ... }
}Provided Methods§
Sourcefn stateful_par_map<F, FO, S>(
self,
func: F,
state: S,
) -> ThreadedStatefulIterator<Self::IntoIter, <Self as IntoIterator>::Item, FO> ⓘ
fn stateful_par_map<F, FO, S>( self, func: F, state: S, ) -> ThreadedStatefulIterator<Self::IntoIter, <Self as IntoIterator>::Item, FO> ⓘ
Creates a multithreaded iterator which applies the given function in parallel. Note: State here is meant to be used as working memory for each thread, don’t rely on it to accumulate values/pass information between function executions.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".