rayon::split_producer

Type Alias SplitInclusiveProducer

Source
pub(crate) type SplitInclusiveProducer<'p, P, V> = SplitProducer<'p, P, V, true>;

Aliased Type§

struct SplitInclusiveProducer<'p, P, V> {
    data: V,
    separator: &'p P,
    tail: usize,
}

Fields§

§data: V§separator: &'p P§tail: usize

Marks the endpoint beyond which we’ve already found no separators.

Implementations

Source§

impl<'p, P, V, const INCL: bool> SplitProducer<'p, P, V, INCL>
where V: Fissile<P> + Send,

Source

pub(crate) fn fold_with<F>(self, folder: F, skip_last: bool) -> F
where F: Folder<V>,

Common fold_with implementation, integrating SplitTerminator’s need to sometimes skip its final empty item.

Source§

impl<'p, P, V> SplitProducer<'p, P, V, true>
where V: Fissile<P> + Send,

Source

pub(crate) fn new_incl(data: V, separator: &'p P) -> Self

Trait Implementations

Source§

impl<'p, P, V, const INCL: bool> UnindexedProducer for SplitProducer<'p, P, V, INCL>
where V: Fissile<P> + Send, P: Sync,

Source§

type Item = V

The type of item returned by this producer.
Source§

fn split(self) -> (Self, Option<Self>)

Split midway into a new producer if possible, otherwise return None.
Source§

fn fold_with<F>(self, folder: F) -> F
where F: Folder<Self::Item>,

Iterate the producer, feeding each element to folder, and stop when the folder is full (or all elements have been consumed).