pub struct Router { /* private fields */ }
Expand description
路由
Implementations§
Source§impl Router
impl Router
Source§impl Router
impl Router
pub fn post<F>(&mut self, path: &str, handler: F)
pub fn trace<F>(&mut self, path: &str, handler: F)
pub fn head<F>(&mut self, path: &str, handler: F)
pub fn put<F>(&mut self, path: &str, handler: F)
pub fn patch<F>(&mut self, path: &str, handler: F)
pub fn delete<F>(&mut self, path: &str, handler: F)
pub fn options<F>(&mut self, path: &str, handler: F)
pub fn any<F>(&mut self, path: &str, handler: F)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Router
impl !RefUnwindSafe for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl !UnwindSafe 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