pub struct PanicHandler { /* private fields */ }Expand description
Structured panic logger for downstream systems
Implementations§
Source§impl PanicHandler
impl PanicHandler
Sourcepub fn new(config: PanicHandlerConfig) -> Result<Self>
pub fn new(config: PanicHandlerConfig) -> Result<Self>
Create a new panic handler
Sourcepub fn install(config: PanicHandlerConfig) -> Result<()>
pub fn install(config: PanicHandlerConfig) -> Result<()>
Install the panic handler globally
Sourcepub fn get_stats(&self) -> Result<PanicStats>
pub fn get_stats(&self) -> Result<PanicStats>
Get current panic statistics
Sourcepub fn reset_stats(&self) -> Result<()>
pub fn reset_stats(&self) -> Result<()>
Reset panic statistics
Auto Trait Implementations§
impl Forget for PanicHandler
impl Freeze for PanicHandler
impl Move for PanicHandler
impl RefUnwindSafe for PanicHandler
impl Send for PanicHandler
impl Sync for PanicHandler
impl Unpin for PanicHandler
impl UnsafeUnpin for PanicHandler
impl UnwindSafe for PanicHandler
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