pub struct HandlerFailure {
pub info: ErrorInfo,
pub handled: bool,
}Expand description
Why a request answered with the error path: the classified failure the
handler raised, and whether the application’s on_error produced the
response.
The handler attaches it to the response as an http::Extensions
value. Hyper never serializes extensions, so a real client receives
exactly the bytes it always did; TestClient lifts it into
TestResponse::error, which is how nitr test explains a 500
without dev mode.
Fields§
§info: ErrorInfoThe classified error: kind, message, source, line, traceback.
handled: boolWhether the app’s on_error handled it.
Trait Implementations§
Source§impl Clone for HandlerFailure
impl Clone for HandlerFailure
Auto Trait Implementations§
impl Freeze for HandlerFailure
impl RefUnwindSafe for HandlerFailure
impl Send for HandlerFailure
impl Sync for HandlerFailure
impl Unpin for HandlerFailure
impl UnsafeUnpin for HandlerFailure
impl UnwindSafe for HandlerFailure
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more