Trait ParMutExt

Source
pub trait ParMutExt<T, R> {
    // Required methods
    fn on_each(self, f: impl Fn(&mut T) -> R + Sync + Send) -> Self;
    fn map(&mut self, f: impl Fn(&mut T) -> R + Sync + Send) -> Vec<R>
       where R: Send;
    fn filter_map(
        &mut self,
        f: impl Fn(&mut T) -> Option<R> + Sync + Send,
    ) -> Vec<R>
       where R: Send;
    fn bind(&mut self, f: impl Fn(&mut T) -> R + Sync + Send) -> Vec<R>
       where R: IntoParallelIterator,
             Vec<R>: FromParallelIterator<<R as IntoParallelIterator>::Item>;
}

Required Methods§

Source

fn on_each(self, f: impl Fn(&mut T) -> R + Sync + Send) -> Self

Source

fn map(&mut self, f: impl Fn(&mut T) -> R + Sync + Send) -> Vec<R>
where R: Send,

Source

fn filter_map( &mut self, f: impl Fn(&mut T) -> Option<R> + Sync + Send, ) -> Vec<R>
where R: Send,

Source

fn bind(&mut self, f: impl Fn(&mut T) -> R + Sync + Send) -> Vec<R>

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<T, R, P> ParMutExt<T, R> for P
where P: DerefMut, P::Target: for<'a> IntoParallelRefMutIterator<'a, Item = &'a mut T>,