Trait PathMatcher

Source
pub trait PathMatcher {
    // Required method
    fn matches(&self, path: &Path) -> bool;

    // Provided method
    fn boxed<'a>(self) -> Box<dyn PathMatcher + 'a>
       where Self: Sized + 'a { ... }
}
Expand description

Allows to match a path against implemented condition.

Required Methods§

Source

fn matches(&self, path: &Path) -> bool

Matches path against this matcher.

Provided Methods§

Source

fn boxed<'a>(self) -> Box<dyn PathMatcher + 'a>
where Self: Sized + 'a,

Converts this matcher to boxed representation.

Can be used for any_of.

Implementors§

Source§

impl<F> PathMatcher for F
where F: Fn(&Path) -> bool,