rama_http::layer::catch_panic

Trait ResponseForPanic

Source
pub trait ResponseForPanic: Clone {
    // Required method
    fn response_for_panic(
        &self,
        err: Box<dyn Any + Send + 'static>,
    ) -> Response<Body>;
}
Expand description

Trait for creating responses from panics.

Required Methods§

Source

fn response_for_panic( &self, err: Box<dyn Any + Send + 'static>, ) -> Response<Body>

Create a response from the panic error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§