Skip to main content

ParallelSlice

Trait ParallelSlice 

Source
pub trait ParallelSlice<T: Sync> {
    // Required method
    fn as_parallel_slice(&self) -> &[T];

    // Provided methods
    fn par_split<P>(&self, separator: P) -> Split<'_, T, P> 
       where P: Fn(&T) -> bool + Sync + Send { ... }
    fn par_windows(&self, window_size: usize) -> Windows<'_, T>  { ... }
    fn par_chunks(&self, chunk_size: usize) -> Chunks<'_, T>  { ... }
    fn par_chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T>  { ... }
    fn par_rchunks(&self, chunk_size: usize) -> RChunks<'_, T>  { ... }
    fn par_rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T>  { ... }
}

Required Methods§

Source

fn as_parallel_slice(&self) -> &[T]

Returns a plain slice, which is used to implement the rest of the parallel methods.

Provided Methods§

Source

fn par_split<P>(&self, separator: P) -> Split<'_, T, P>
where P: Fn(&T) -> bool + Sync + Send,

Source

fn par_windows(&self, window_size: usize) -> Windows<'_, T>

Source

fn par_chunks(&self, chunk_size: usize) -> Chunks<'_, T>

Source

fn par_chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T>

Source

fn par_rchunks(&self, chunk_size: usize) -> RChunks<'_, T>

Source

fn par_rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: Sync> ParallelSlice<T> for [T]

Implementors§