pub trait PatternMatchManywhere
Self: PatternMatch,{
// Provided methods
fn pattern_match_all(
&self,
patterns: &[&str],
case_insensitive: bool,
) -> bool { ... }
fn pattern_match_all_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool { ... }
fn pattern_match_all_conditional(
&self,
pattern_sets: &[(bool, &str, bool)],
) -> bool { ... }
fn pattern_match_all_ci(&self, patterns: &[&str]) -> bool { ... }
fn pattern_match_all_cs(&self, patterns: &[&str]) -> bool { ... }
fn pattern_match_any(
&self,
patterns: &[&str],
case_insensitive: bool,
) -> bool { ... }
fn pattern_match_any_ci(&self, patterns: &[&str]) -> bool { ... }
fn pattern_match_any_cs(&self, patterns: &[&str]) -> bool { ... }
fn pattern_match_any_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool { ... }
fn pattern_match_any_conditional(
&self,
pattern_sets: &[(bool, &str, bool)],
) -> bool { ... }
}
Expand description
Provides methods to match with multiple patterns expressed as arrays of tuples or simple strs (for pattern_match_all_ci and pattern_match_all_cs)
Provided Methods§
Sourcefn pattern_match_all(&self, patterns: &[&str], case_insensitive: bool) -> bool
fn pattern_match_all(&self, patterns: &[&str], case_insensitive: bool) -> bool
Matches all of the patterns in case-sensitivity flag with an array of tuples (patterns, case_insensitive)
Sourcefn pattern_match_all_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool
fn pattern_match_all_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool
Matches all of the patterns with case-insensitive flag
e.g. (r#"a[ck]"#, true)
“ac” or “ak” whether upper, lower or mixed case
with an array of tuples (pattern, replacement, case_insensitive)
Consider renaming with all
Sourcefn pattern_match_all_conditional(
&self,
pattern_sets: &[(bool, &str, bool)],
) -> bool
fn pattern_match_all_conditional( &self, pattern_sets: &[(bool, &str, bool)], ) -> bool
Matches all of the patterns with positivity condition and case-insensitive flag
e.g. (false, "a[ck]", true)
does not contain “ac” or “ak” whether upper, lower or mixed case
with an array of tuples (positive, pattern, case_insensitive)
Sourcefn pattern_match_all_ci(&self, patterns: &[&str]) -> bool
fn pattern_match_all_ci(&self, patterns: &[&str]) -> bool
Matches all of the patterns in case-insensitive mode with an array of str patterns
Sourcefn pattern_match_all_cs(&self, patterns: &[&str]) -> bool
fn pattern_match_all_cs(&self, patterns: &[&str]) -> bool
Matches all of the patterns in case-sensitive mode with an array of str patterns
Sourcefn pattern_match_any(&self, patterns: &[&str], case_insensitive: bool) -> bool
fn pattern_match_any(&self, patterns: &[&str], case_insensitive: bool) -> bool
Matches one or more of the patterns in case-sensitivity flag with an array of tuples (patterns, case_insensitive)
Sourcefn pattern_match_any_ci(&self, patterns: &[&str]) -> bool
fn pattern_match_any_ci(&self, patterns: &[&str]) -> bool
Matches one or more of the patterns in case-insensitive mode with an array of str patterns
Sourcefn pattern_match_any_cs(&self, patterns: &[&str]) -> bool
fn pattern_match_any_cs(&self, patterns: &[&str]) -> bool
Matches one or more of the patterns in case-sensitive mode with an array of str patterns
Sourcefn pattern_match_any_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool
fn pattern_match_any_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool
Matches one or more of the patterns with case-insensitive flag
e.g. (r#"a[ck]"#, true)
matches “ac” or “ak” whether upper, lower or mixed case
with an array of tuples (pattern, replacement, case_insensitive)
Implementations on Foreign Types§
impl PatternMatchMany for str
Implement PatternMatchMany for &str/String
impl PatternMatchMany for [&str]
Implement PatternMatchMany for vectors of strings.