Trait string_patterns::PatternMatchMany 
source · pub trait PatternMatchMany {
    // Required methods
    fn pattern_match_many(
        &self,
        patterns: &[&str],
        case_insensitive: bool
    ) -> bool;
    fn pattern_match_many_ci(&self, patterns: &[&str]) -> bool;
    fn pattern_match_many_cs(&self, patterns: &[&str]) -> bool;
    fn pattern_match_many_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool;
    fn pattern_match_many_conditional(
        &self,
        pattern_sets: &[(bool, &str, bool)]
    ) -> 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_many_ci and pattern_match_many_cs)
Required Methods§
sourcefn pattern_match_many(&self, patterns: &[&str], case_insensitive: bool) -> bool
 
fn pattern_match_many(&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_many_ci(&self, patterns: &[&str]) -> bool
 
fn pattern_match_many_ci(&self, patterns: &[&str]) -> bool
Matches all of the patterns in case-insensitive mode with an array of str patterns
sourcefn pattern_match_many_cs(&self, patterns: &[&str]) -> bool
 
fn pattern_match_many_cs(&self, patterns: &[&str]) -> bool
Matches all of the patterns in case-sensitive mode with an array of str patterns
sourcefn pattern_match_many_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool
 
fn pattern_match_many_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool
Matches all 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)
sourcefn pattern_match_many_conditional(
    &self,
    pattern_sets: &[(bool, &str, bool)]
) -> bool
 
fn pattern_match_many_conditional( &self, pattern_sets: &[(bool, &str, bool)] ) -> bool
string matches all conditional patterns which may be positive / negative and case insensitive or not
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 boolean flag
Implementations on Foreign Types§
source§impl PatternMatchMany for str
 
impl PatternMatchMany for str
source§fn pattern_match_many(&self, patterns: &[&str], case_insensitive: bool) -> bool
 
fn pattern_match_many(&self, patterns: &[&str], case_insensitive: bool) -> bool
Matches all of the patterns in case-sensitivity flag with an array of tuples (patterns, case_insensitive)
source§fn pattern_match_many_ci(&self, patterns: &[&str]) -> bool
 
fn pattern_match_many_ci(&self, patterns: &[&str]) -> bool
Matches all of the patterns in case-insensitive mode with an array of str patterns
source§fn pattern_match_many_cs(&self, patterns: &[&str]) -> bool
 
fn pattern_match_many_cs(&self, patterns: &[&str]) -> bool
Matches all of the patterns in case-sensitive mode with an array of str patterns
source§fn pattern_match_many_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool
 
fn pattern_match_many_mixed(&self, pattern_sets: &[(&str, bool)]) -> bool
Matches all 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)
source§fn pattern_match_many_conditional(
    &self,
    pattern_sets: &[(bool, &str, bool)]
) -> bool
 
fn pattern_match_many_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)
source§fn 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)
source§fn 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
source§fn 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
source§impl PatternMatchMany for [String]
 
impl PatternMatchMany for [String]
Implement PatternMatchMany for vectors of strings.
source§fn pattern_match_any(&self, patterns: &[&str], case_insensitive: bool) -> bool
 
fn pattern_match_any(&self, patterns: &[&str], case_insensitive: bool) -> bool
with an array of tuples (patterns, case_insensitive) Matches one or more of the patterns in case-sensitivity flag
source§fn 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
source§fn 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
source§fn 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 (pattepattern_match_many_cirn, replacement, case_insensitive)
source§fn pattern_match_any_conditional(
    &self,
    pattern_sets: &[(bool, &str, bool)]
) -> bool
 
fn pattern_match_any_conditional( &self, pattern_sets: &[(bool, &str, bool)] ) -> bool
Matches one or more of the patterns with positivity condition and case-insensitive flag