pub struct Router { /* private fields */ }
Implementations§
Source§impl Router
impl Router
pub fn new() -> Self
pub fn get<F>(&mut self, route: &str, handler: F)
pub fn get_async<F, Fut>(&mut self, route: &str, handler: F)
pub fn post<F>(&mut self, route: &str, handler: F)
pub fn post_async<F, Fut>(&mut self, route: &str, handler: F)
pub fn put<F>(&mut self, route: &str, handler: F)
pub fn put_async<F, Fut>(&mut self, route: &str, handler: F)
pub fn patch<F>(&mut self, route: &str, handler: F)
pub fn patch_async<F, Fut>(&mut self, route: &str, handler: F)
pub fn delete<F>(&mut self, route: &str, handler: F)
pub fn delete_async<F, Fut>(&mut self, route: &str, handler: F)
pub async fn handle_request(&self, stream: &mut TcpStream, request: &Request)
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