pub struct Router { /* private fields */ }Implementations§
Source§impl Router
impl Router
pub fn get<P: ToString, H: Fn(Request<'_>, Response) -> (String, Vec<u8>) + Send + Sync + 'static>( &mut self, path: P, h: H, ) -> &mut Self
pub fn post<P: ToString, H: Fn(Request<'_>, Response) -> (String, Vec<u8>) + Send + Sync + 'static>( &mut self, path: P, h: H, ) -> &mut Self
pub fn start<A: ToSocketAddrs>(&self, addr: A)
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 UnsafeUnpin 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