Trait rayon::str::private::Pattern

source ·
pub trait Pattern: Sized + Sync + Send {
    // Required methods
    fn find_in(&self, haystack: &str) -> Option<usize>;
    fn rfind_in(&self, haystack: &str) -> Option<usize>;
    fn is_suffix_of(&self, haystack: &str) -> bool;
    fn fold_splits<'ch, F>(
        &self,
        haystack: &'ch str,
        folder: F,
        skip_last: bool,
    ) -> F
       where F: Folder<&'ch str>;
    fn fold_inclusive_splits<'ch, F>(&self, haystack: &'ch str, folder: F) -> F
       where F: Folder<&'ch str>;
    fn fold_matches<'ch, F>(&self, haystack: &'ch str, folder: F) -> F
       where F: Folder<&'ch str>;
    fn fold_match_indices<'ch, F>(
        &self,
        haystack: &'ch str,
        folder: F,
        base: usize,
    ) -> F
       where F: Folder<(usize, &'ch str)>;
}
Expand description

Pattern-matching trait for ParallelString, somewhat like a mix of std::str::pattern::{Pattern, Searcher}.

Implementing this trait is not permitted outside of rayon.

Required Methods§

source

fn find_in(&self, haystack: &str) -> Option<usize>

source

fn rfind_in(&self, haystack: &str) -> Option<usize>

source

fn is_suffix_of(&self, haystack: &str) -> bool

source

fn fold_splits<'ch, F>( &self, haystack: &'ch str, folder: F, skip_last: bool, ) -> F
where F: Folder<&'ch str>,

source

fn fold_inclusive_splits<'ch, F>(&self, haystack: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source

fn fold_matches<'ch, F>(&self, haystack: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source

fn fold_match_indices<'ch, F>( &self, haystack: &'ch str, folder: F, base: usize, ) -> F
where F: Folder<(usize, &'ch str)>,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Pattern for &[char]

source§

fn find_in(&self, chars: &str) -> Option<usize>

source§

fn rfind_in(&self, chars: &str) -> Option<usize>

source§

fn is_suffix_of(&self, chars: &str) -> bool

source§

fn fold_splits<'ch, F>(&self, chars: &'ch str, folder: F, skip_last: bool) -> F
where F: Folder<&'ch str>,

source§

fn fold_inclusive_splits<'ch, F>(&self, chars: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source§

fn fold_matches<'ch, F>(&self, chars: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source§

fn fold_match_indices<'ch, F>( &self, chars: &'ch str, folder: F, base: usize, ) -> F
where F: Folder<(usize, &'ch str)>,

source§

impl Pattern for char

source§

fn find_in(&self, chars: &str) -> Option<usize>

source§

fn rfind_in(&self, chars: &str) -> Option<usize>

source§

fn is_suffix_of(&self, chars: &str) -> bool

source§

fn fold_splits<'ch, F>(&self, chars: &'ch str, folder: F, skip_last: bool) -> F
where F: Folder<&'ch str>,

source§

fn fold_inclusive_splits<'ch, F>(&self, chars: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source§

fn fold_matches<'ch, F>(&self, chars: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source§

fn fold_match_indices<'ch, F>( &self, chars: &'ch str, folder: F, base: usize, ) -> F
where F: Folder<(usize, &'ch str)>,

source§

impl<const N: usize> Pattern for &[char; N]

source§

fn find_in(&self, chars: &str) -> Option<usize>

source§

fn rfind_in(&self, chars: &str) -> Option<usize>

source§

fn is_suffix_of(&self, chars: &str) -> bool

source§

fn fold_splits<'ch, F>(&self, chars: &'ch str, folder: F, skip_last: bool) -> F
where F: Folder<&'ch str>,

source§

fn fold_inclusive_splits<'ch, F>(&self, chars: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source§

fn fold_matches<'ch, F>(&self, chars: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source§

fn fold_match_indices<'ch, F>( &self, chars: &'ch str, folder: F, base: usize, ) -> F
where F: Folder<(usize, &'ch str)>,

source§

impl<const N: usize> Pattern for [char; N]

source§

fn find_in(&self, chars: &str) -> Option<usize>

source§

fn rfind_in(&self, chars: &str) -> Option<usize>

source§

fn is_suffix_of(&self, chars: &str) -> bool

source§

fn fold_splits<'ch, F>(&self, chars: &'ch str, folder: F, skip_last: bool) -> F
where F: Folder<&'ch str>,

source§

fn fold_inclusive_splits<'ch, F>(&self, chars: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source§

fn fold_matches<'ch, F>(&self, chars: &'ch str, folder: F) -> F
where F: Folder<&'ch str>,

source§

fn fold_match_indices<'ch, F>( &self, chars: &'ch str, folder: F, base: usize, ) -> F
where F: Folder<(usize, &'ch str)>,

Implementors§

source§

impl<FN: Sync + Send + Fn(char) -> bool> Pattern for FN