pub struct Path {
    pub matcher: Regex,
}
Expand description

Represents a path in HTTP sense (starting from /)

Fields

matcher: Regex

Implementations

Creates a new path.

This method accepts regular expressions so you can write something like this:

use hyper_router::Path;
Path::new(r"/person/\d+");

Note that you don’t have to match beggining and end of the path using ^ and $ - those are inserted for you automatically.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.