pub struct CatchPanicLayer;Expand description
Tower layer that catches panics from the inner service.
On a panic the inner service’s future is abandoned, the panic payload is
logged via tracing::error!, and a bare 500 response is returned. When
layered inside crate::error::ErrorEnvelopeLayer that 500 is rendered as
the production error envelope.
Trait Implementations§
Source§impl Clone for CatchPanicLayer
impl Clone for CatchPanicLayer
Source§fn clone(&self) -> CatchPanicLayer
fn clone(&self) -> CatchPanicLayer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CatchPanicLayer
Source§impl Debug for CatchPanicLayer
impl Debug for CatchPanicLayer
Source§impl Default for CatchPanicLayer
impl Default for CatchPanicLayer
Source§fn default() -> CatchPanicLayer
fn default() -> CatchPanicLayer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CatchPanicLayer
impl RefUnwindSafe for CatchPanicLayer
impl Send for CatchPanicLayer
impl Sync for CatchPanicLayer
impl Unpin for CatchPanicLayer
impl UnsafeUnpin for CatchPanicLayer
impl UnwindSafe for CatchPanicLayer
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