pub struct SuppressPanicStderr;Expand description
RAII guard that suppresses panic-hook stderr output for its lifetime.
Create one immediately before catch_unwind; the hook will stay silent
until the guard is dropped (on exit from scope, including on panic).
ⓘ
let _guard = SuppressPanicStderr::new();
let result = std::panic::catch_unwind(|| { /* … */ });
guard dropped here → suppression liftedImplementations§
Trait Implementations§
Source§impl Default for SuppressPanicStderr
impl Default for SuppressPanicStderr
Auto Trait Implementations§
impl Freeze for SuppressPanicStderr
impl RefUnwindSafe for SuppressPanicStderr
impl Send for SuppressPanicStderr
impl Sync for SuppressPanicStderr
impl Unpin for SuppressPanicStderr
impl UnsafeUnpin for SuppressPanicStderr
impl UnwindSafe for SuppressPanicStderr
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