pub struct App { /* private fields */ }Implementations§
Source§impl App
impl App
pub fn new() -> Self
pub fn set_timeout(&mut self, seconds: u64)
pub fn set_connection_limit(&mut self, limit: u64)
pub fn set_read_timeout(&mut self, seconds: u64)
pub fn set_header_limit(&mut self, bytes: usize)
pub fn get<H>(&mut self, path: &str, handler: H)where
H: Handler + 'static,
pub fn post<H>(&mut self, path: &str, handler: H)where
H: Handler + 'static,
pub fn put<H>(&mut self, path: &str, handler: H)where
H: Handler + 'static,
pub fn patch<H>(&mut self, path: &str, handler: H)where
H: Handler + 'static,
pub fn delete<H>(&mut self, path: &str, handler: H)where
H: Handler + 'static,
pub fn group<'a>(&'a mut self, path: &str) -> Group<'a>
pub fn middleware<M>(
&mut self,
path: &str,
method: Option<Method>,
middleware_fn: M,
)where
M: Middleware + 'static,
pub fn set_error_handler<E>(&mut self, handler: E)where
E: ErrorHandler + 'static,
pub async fn run(&self, addr: &str, mode: Mode) -> Result<(), BoltError>
pub async fn run_tls( &self, addr: &str, mode: Mode, tls: Option<(&str, &str)>, ) -> Result<(), BoltError>
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