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§
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
fn fold_inclusive_splits<'ch, F>(&self, haystack: &'ch str, folder: F) -> F
fn fold_matches<'ch, F>(&self, haystack: &'ch str, folder: F) -> F
fn fold_match_indices<'ch, F>( &self, haystack: &'ch str, folder: F, base: usize, ) -> F
Object Safety§
This trait is not object safe.