Trait rayon::split_producer::Fissile

source ·
pub(crate) trait Fissile<P>: Sized {
    // Required methods
    fn length(&self) -> usize;
    fn midpoint(&self, end: usize) -> usize;
    fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize>;
    fn rfind(&self, separator: &P, end: usize) -> Option<usize>;
    fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self);
    fn fold_splits<F, const INCL: bool>(
        self,
        separator: &P,
        folder: F,
        skip_last: bool,
    ) -> F
       where F: Folder<Self>,
             Self: Send;
}
Expand description

Helper trait so &str, &[T], and &mut [T] can share SplitProducer.

Required Methods§

source

fn length(&self) -> usize

source

fn midpoint(&self, end: usize) -> usize

source

fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize>

source

fn rfind(&self, separator: &P, end: usize) -> Option<usize>

source

fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self)

source

fn fold_splits<F, const INCL: bool>( self, separator: &P, folder: F, skip_last: bool, ) -> F
where F: Folder<Self>, Self: Send,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'ch, P: Pattern> Fissile<P> for &'ch str

Implement support for SplitProducer.

source§

fn length(&self) -> usize

source§

fn midpoint(&self, end: usize) -> usize

source§

fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize>

source§

fn rfind(&self, separator: &P, end: usize) -> Option<usize>

source§

fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self)

source§

fn fold_splits<F, const INCL: bool>( self, separator: &P, folder: F, skip_last: bool, ) -> F
where F: Folder<Self>,

source§

impl<'data, T, P> Fissile<P> for &'data [T]
where P: Fn(&T) -> bool,

Implement support for SplitProducer.

source§

fn length(&self) -> usize

source§

fn midpoint(&self, end: usize) -> usize

source§

fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize>

source§

fn rfind(&self, separator: &P, end: usize) -> Option<usize>

source§

fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self)

source§

fn fold_splits<F, const INCL: bool>( self, separator: &P, folder: F, skip_last: bool, ) -> F
where F: Folder<Self>, Self: Send,

source§

impl<'data, T, P> Fissile<P> for &'data mut [T]
where P: Fn(&T) -> bool,

Implement support for SplitProducer.

source§

fn length(&self) -> usize

source§

fn midpoint(&self, end: usize) -> usize

source§

fn find(&self, separator: &P, start: usize, end: usize) -> Option<usize>

source§

fn rfind(&self, separator: &P, end: usize) -> Option<usize>

source§

fn split_once<const INCL: bool>(self, index: usize) -> (Self, Self)

source§

fn fold_splits<F, const INCL: bool>( self, separator: &P, folder: F, skip_last: bool, ) -> F
where F: Folder<Self>, Self: Send,

Implementors§