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§
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
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<'ch, P: Pattern> Fissile<P> for &'ch str
impl<'ch, P: Pattern> Fissile<P> for &'ch str
Implement support for SplitProducer
.
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,
) -> Fwhere
F: Folder<Self>,
source§impl<'data, T, P> Fissile<P> for &'data [T]
impl<'data, T, P> Fissile<P> for &'data [T]
Implement support for SplitProducer
.
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
source§impl<'data, T, P> Fissile<P> for &'data mut [T]
impl<'data, T, P> Fissile<P> for &'data mut [T]
Implement support for SplitProducer
.