Struct hyper_router::Path [] [src]

pub struct Path {
    pub matcher: Regex,
}

Represents a path in HTTP sense (starting from /)

Fields

matcher

Methods

impl Path

fn new(path: &str) -> Path

Creates a new path.

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

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

Derived Implementations

impl Debug for Path

fn fmt(&self, __arg_0: &mut Formatter) -> Result