catch_panic_layer_fn

Function catch_panic_layer_fn 

Source
pub fn catch_panic_layer_fn(
    err: Box<dyn Any + Send + 'static>,
) -> Response<Full<Bytes>>
Expand description

Custom callback that is used by Tower to fulfill the tower_http::catch_panic::ResponseForPanic trait.

This should be added to tonic server builder as a layer via CatchPanicLayer::custom().