pub struct Error(pub StatusCode, pub Error);Expand description
Intermediate error type which can be converted to from any error using ?.
The standard impl From<E> for Error will attach StatusCode::INTERNAL_SERVER_ERROR,
so if an alternative StatusCode is desired, you should use .status_code (AddStatusCode)
to add the status before using ?.
Tuple Fields§
§0: StatusCode§1: ErrorTrait Implementations§
source§impl IntoResponse for Error
impl IntoResponse for Error
source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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