Struct pencil::routing::Matcher
[−]
[src]
pub struct Matcher {
pub regex: Regex,
}The matcher holds the url regex object.
Fields
regex |
Methods
impl Matcher
Trait Implementations
impl<'a> From<&'a str> for Matcher
Rule strings basically are just normal URL paths with placeholders in
the format <converter:name> where the converter are optional.
Currently we support following converters:
- string(default)
- int
- float
- path
If no converter is defined the default converter is used which means string.
URL rules that end with a slash are branch URLs, others are leaves.
impl From<String> for Matcher
Same rule as &str.