Struct tower_http::catch_panic::DefaultResponseForPanic
source · #[non_exhaustive]pub struct DefaultResponseForPanic;
Available on crate feature
catch-panic
only.Expand description
The default ResponseForPanic
used by CatchPanic
.
It will log the panic message and return a 500 Internal Server
error response with an empty
body.
Trait Implementations§
source§impl Clone for DefaultResponseForPanic
impl Clone for DefaultResponseForPanic
source§fn clone(&self) -> DefaultResponseForPanic
fn clone(&self) -> DefaultResponseForPanic
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DefaultResponseForPanic
impl Debug for DefaultResponseForPanic
source§impl Default for DefaultResponseForPanic
impl Default for DefaultResponseForPanic
source§fn default() -> DefaultResponseForPanic
fn default() -> DefaultResponseForPanic
Returns the “default value” for a type. Read more
source§impl ResponseForPanic for DefaultResponseForPanic
impl ResponseForPanic for DefaultResponseForPanic
§type ResponseBody = Full<Bytes>
type ResponseBody = Full<Bytes>
The body type used for responses to panics.
source§fn response_for_panic(
&mut self,
err: Box<dyn Any + Send + 'static>
) -> Response<Self::ResponseBody>
fn response_for_panic(
&mut self,
err: Box<dyn Any + Send + 'static>
) -> Response<Self::ResponseBody>
Create a response from the panic error.