Skip to main content

UrlMatcher

Trait UrlMatcher 

Source
pub trait UrlMatcher: Send + Sync {
    // Required method
    fn matches(&self, url: &str) -> bool;
}
Expand description

Trait for types that can match URLs.

Required Methods§

Source

fn matches(&self, url: &str) -> bool

Check if the URL matches.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl UrlMatcher for Regex

Source§

fn matches(&self, url: &str) -> bool

Source§

impl UrlMatcher for String

Source§

fn matches(&self, url: &str) -> bool

Source§

impl UrlMatcher for str

Source§

fn matches(&self, url: &str) -> bool

Implementors§

Source§

impl UrlMatcher for UrlPattern

Source§

impl<F> UrlMatcher for F
where F: Fn(&str) -> bool + Send + Sync,