pub struct Bolt { /* private fields */ }Implementations§
Source§impl Bolt
impl Bolt
pub fn new() -> Self
pub async fn run( &self, addr: &str, mode: Mode, tls: Option<(&str, &str)>, ) -> Result<(), Box<dyn Error + Send + Sync>>
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(&mut self, path: &str) -> Group<'_>
pub fn middleware<M>(
&mut self,
path: &str,
method: Option<Method>,
middleware_fn: M,
)where
M: Middleware + 'static,
pub fn set_error_handler(&mut self, handler: Arc<dyn ErrorHandler>)
Auto Trait Implementations§
impl !Freeze for Bolt
impl !RefUnwindSafe for Bolt
impl Send for Bolt
impl Sync for Bolt
impl Unpin for Bolt
impl !UnwindSafe for Bolt
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