Matcher

Trait Matcher 

Source
pub trait Matcher:
    Debug
    + Clone
    + Hash
    + Serialize
    + DeserializeOwned
    + PartialEq {
    // Required methods
    fn matches(&self, matcher: &Self) -> bool;
    fn specificity(&self) -> u32;
}
Expand description

Determines whether two instances match. We can also ask it how specific it is.

Required Methods§

Source

fn matches(&self, matcher: &Self) -> bool

Source

fn specificity(&self) -> u32

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> Matcher for Option<T>
where T: Matcher,

Source§

fn matches(&self, matcher: &Self) -> bool

Source§

fn specificity(&self) -> u32

Implementors§