Skip to main content

RayonConsumer

Trait RayonConsumer 

Source
pub trait RayonConsumer {
    type Item: Send;

    // Required method
    fn consume(self, func: impl FnMut(Self::Item));
}
Expand description

Tools for consume rayon iterator.

Required Associated Types§

Required Methods§

Source

fn consume(self, func: impl FnMut(Self::Item))

Use to immediately consume the data produced by the rayon iterator without waiting for all the data to be processed. The closures runs in the current thread.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<P, I> RayonConsumer for P
where P: ParallelIterator<Item = I>, I: Send,

Source§

type Item = I