[][src]Struct usher::matcher::StaticMatcher

pub struct StaticMatcher { /* fields omitted */ }

Static path segment matcher.

This struct is constructed via the StaticParser and compares incoming segments directly against the internal static String segment.

Methods

impl StaticMatcher[src]

pub fn new<S: Into<String>>(s: S) -> Self[src]

Constructs a new StaticMatcher from a segment.

Trait Implementations

impl Matcher for StaticMatcher[src]

fn is_match(&self, segment: &str) -> bool[src]

Compares an incoming segment against a literal base segment.

fn capture<'a>(&'a self, _segment: &str) -> Option<Capture<'a>>[src]

Retrieves a potential capture from a segment.

Auto Trait Implementations

Blanket Implementations

impl<F> Matcher for F where
    F: Fn(&str) -> bool + Send + Sync
[src]

fn is_match(&Self, &str) -> bool[src]

Determines whether an incoming segment is a match for a base segment.

fn capture<'a>(&'a self, _segment: &str) -> Option<Capture<'a>>[src]

Retrieves a potential capture from a segment.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.