pub struct Router<T> {
pub fn404: HandlerFn<T>,
/* private fields */
}
Fields
fn404: HandlerFn<T>
Implementations
sourceimpl<T: 'static> Router<T>
impl<T: 'static> Router<T>
pub fn new(state: T) -> Self
pub fn get(&mut self, path: &str, raw_fn: fn(_: &Context<'_, T>))
pub fn post(&mut self, path: &str, raw_fn: fn(_: &Context<'_, T>))
pub fn group(&mut self, path: &str) -> &mut Self
pub fn mw(&mut self, raw_fn: fn(_: &Context<'_, T>)) -> &mut Self
pub fn root(&mut self) -> &mut Self
Auto Trait Implementations
impl<T> !RefUnwindSafe for Router<T>
impl<T> Send for Router<T>where
T: Send,
impl<T> Sync for Router<T>where
T: Sync,
impl<T> Unpin for Router<T>where
T: Unpin,
impl<T> !UnwindSafe for Router<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more