pub struct DefaultExceptionHandler;Expand description
Default exception handler implementation
Converts exceptions to appropriate HTTP error responses.
Trait Implementations§
Source§impl ExceptionHandler for DefaultExceptionHandler
impl ExceptionHandler for DefaultExceptionHandler
Source§fn handle_exception<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 Request,
error: DispatchError,
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_exception<'life0, 'life1, 'async_trait>(
&'life0 self,
_request: &'life1 Request,
error: DispatchError,
) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle an exception and convert it to a response
Auto Trait Implementations§
impl Freeze for DefaultExceptionHandler
impl RefUnwindSafe for DefaultExceptionHandler
impl Send for DefaultExceptionHandler
impl Sync for DefaultExceptionHandler
impl Unpin for DefaultExceptionHandler
impl UnsafeUnpin for DefaultExceptionHandler
impl UnwindSafe for DefaultExceptionHandler
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