pub struct App { /* private fields */ }Implementations§
Source§impl App
impl App
pub fn new(config: AppConfig) -> Self
pub fn use_middleware<MD: Middleware + 'static>(&mut self, middleware: MD)
pub fn route<H>(&mut self, medhod: &str, path: &str, handler: H)
pub fn get<H>(&mut self, path: &str, handler: H)
pub fn post<H>(&mut self, path: &str, handler: H)
pub fn delete<H>(&mut self, path: &str, handler: H)
pub fn put<H>(&mut self, path: &str, handler: H)
pub fn listen(&self, address: &str)
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnwindSafe 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