pub struct Path {
pub matcher: Regex,
}
Expand description
Represents a path in HTTP sense (starting from /
)
Fields§
§matcher: Regex
Implementations§
Source§impl 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_routing::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 Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more