Skip to main content

ParallelByteRandomGenerator

Trait ParallelByteRandomGenerator 

Source
pub trait ParallelByteRandomGenerator: RandomGenerator + Send {
    type ParChildrenIter: IndexedParallelIterator<Item = Self>;

    // Required method
    fn par_try_fork(
        &mut self,
        n_children: ChildrenCount,
        n_bytes: BytesPerChild,
    ) -> Result<Self::ParChildrenIter, ForkError>;
}
Expand description

A trait extending RandomGenerator to the parallel iterators of rayon.

Required Associated Types§

Source

type ParChildrenIter: IndexedParallelIterator<Item = Self>

The iterator over children generators, returned by par_try_fork in case of success.

Required Methods§

Source

fn par_try_fork( &mut self, n_children: ChildrenCount, n_bytes: BytesPerChild, ) -> Result<Self::ParChildrenIter, ForkError>

Tries to fork the generator into a parallel iterator of n_children new generators, each able to output n_bytes bytes.

§Note:

To be successful, the number of remaining bytes for the parent generator must be larger than n_children*n_bytes.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§