Struct chilli::routing::Matcher [] [src]

pub struct Matcher {
    pub regex: Regex,
    pub matches_query: bool,
}

The matcher holds the url regex object.

Fields

Methods

impl Matcher
[src]

[src]

Trait Implementations

impl Clone for Matcher
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Matcher
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> From<&'a str> for Matcher
[src]

Rule strings basically are just normal URL paths with placeholders in the format <name:converter> 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. All branch URLs that are matched without a trailing slash will trigger a redirect to the same URL with the missing slash appended. We have a url without a trailing slash for branch url rule. So we redirect to the same url but with a trailing slash.

[src]

Performs the conversion.

impl From<String> for Matcher
[src]

Same rule as &str.

[src]

Performs the conversion.

impl From<Regex> for Matcher
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Matcher

impl Sync for Matcher