pub struct WebError<St = (), Err = DefaultError>(/* private fields */);Expand description
Type-erased web error for the Err error domain.
Web services, middleware, and filters use WebError as their error type.
It stores any error that implements WebResponseError for the same
application state and error domain, and renders it with that
implementation.
Implementations§
Trait Implementations§
Source§impl<St, Err> Error for WebError<St, Err>
impl<St, Err> Error for WebError<St, Err>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<St, Err> ResponseError for WebError<St, Err>
impl<St, Err> ResponseError for WebError<St, Err>
Source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Creates an HTTP response for this error. Read more
Source§impl<St: 'static, Err: 'static> WebResponseError<St, Err> for WebError<St, Err>
impl<St: 'static, Err: 'static> WebResponseError<St, Err> for WebError<St, Err>
Source§fn error_response(&self, st: &St) -> HttpResponse
fn error_response(&self, st: &St) -> HttpResponse
Generate response for error Read more
Auto Trait Implementations§
impl<St = (), Err = DefaultError> !RefUnwindSafe for WebError<St, Err>
impl<St = (), Err = DefaultError> !Send for WebError<St, Err>
impl<St = (), Err = DefaultError> !Sync for WebError<St, Err>
impl<St = (), Err = DefaultError> !UnwindSafe for WebError<St, Err>
impl<St, Err> Freeze for WebError<St, Err>
impl<St, Err> Unpin for WebError<St, Err>
impl<St, Err> UnsafeUnpin for WebError<St, Err>
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