pub trait Parser: Send + Sync {
    fn parse(&self, segment: &str) -> Option<Box<dyn Matcher>>;
}
Expand description

Parsing trait to enable conversion from literals into matchers.

This is used to run through a cascading parsing flow to enable custom matchers being implemented. This trait enables all segment matching to be determined at creation time to avoid any costs at routing time.

Required Methods

Attempts to parse a Matcher out of a segment.

Implementors

Parser implementation for the static matcher.

Blanket implementation of Parser for pure functions.