pub struct Router { /* private fields */ }Implementations§
Source§impl Router
impl Router
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new, empty Router.
let router = Router::new();Equivalent to Router::default().
pub fn route<R: Into<Route>>(&mut self, route: R)
👎Deprecated since 0.0.7:
use Router::add instead
pub fn find(&self, method: &Method, uri: &str) -> Option<&Route>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Router
impl !UnwindSafe for Router
impl Freeze for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl UnsafeUnpin for Router
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