Skip to main content

Matcher

Trait Matcher 

Source
pub trait Matcher: AsStr {
    // Required method
    fn is_match(&self, haystack: &str) -> bool;
}

Required Methods§

Source

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

Returns true if and only if there is a match for the pattern anywhere in the haystack given.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Matcher for Regex

Source§

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

Source§

impl<T: Matcher> Matcher for LazyLock<T>

Source§

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

Source§

impl<T: Matcher> Matcher for Lazy<T>

Source§

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

Implementors§