pub struct App { /* private fields */ }Expand description
Main application struct
Implementations§
Source§impl App
impl App
pub fn new() -> Self
Sourcepub fn get_with_params<F, Fut>(self, path: &str, handler: F) -> Self
pub fn get_with_params<F, Fut>(self, path: &str, handler: F) -> Self
Add GET route with path params extractor
Sourcepub fn middleware<M>(self, middleware: M) -> Selfwhere
M: Middleware,
pub fn middleware<M>(self, middleware: M) -> Selfwhere
M: Middleware,
Add middleware
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl !UnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
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