pub struct AnyhowHttpError { /* private fields */ }
Expand description
Wrapper around anyhow::Error allowing it to be used as a HttpError, contains a StatusCode that will be used for the response.
If the hide-anyhow
feature is enable errors from anyhow will contain a
generic error message rather than the Display message
Trait Implementations§
Source§impl Debug for AnyhowHttpError
impl Debug for AnyhowHttpError
Source§impl Display for AnyhowHttpError
impl Display for AnyhowHttpError
Source§impl Error for AnyhowHttpError
impl Error for AnyhowHttpError
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 HttpError for AnyhowHttpError
impl HttpError for AnyhowHttpError
Source§fn log(&self)
fn log(&self)
Handles logging the error when its translated into an HTTP error response Read more
Source§fn status(&self) -> StatusCode
fn status(&self) -> StatusCode
Handles determining the HTTP status code that should be used
for the HTTP response Read more
Auto Trait Implementations§
impl Freeze for AnyhowHttpError
impl RefUnwindSafe for AnyhowHttpError
impl Send for AnyhowHttpError
impl Sync for AnyhowHttpError
impl Unpin for AnyhowHttpError
impl UnwindSafe for AnyhowHttpError
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
Source§impl<E> ErrorExt for E
impl<E> ErrorExt for E
Source§fn into_generic(self) -> GenericServerError
fn into_generic(self) -> GenericServerError
Converts this error into a generic error