Struct hyper_router::Path
[−]
[src]
pub struct Path { pub matcher: Regex, }
Represents a path in HTTP sense (starting from /
)
Fields
matcher: Regex
Methods
impl Path
[src]
fn new(path: &str) -> Path
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.