Struct hyper_routing::Path
source · [−]pub struct Path {
pub matcher: Regex,
}Expand description
Represents a path in HTTP sense (starting from /)
Fields
matcher: RegexImplementations
sourceimpl Path
impl Path
sourcepub fn new(path: &str) -> Path
pub 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.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more