pub struct Config { /* private fields */ }
Expand description
Configures the panic hook, ending with initialization.
§Example
log_panics::Config::new()
.backtrace_mode(log_panics::BacktraceMode::Unresolved)
.install_panic_hook()
Implementations§
Source§impl Config
impl Config
Sourcepub fn backtrace_mode(self, mode: BacktraceMode) -> Self
Available on crate feature with-backtrace
only.
pub fn backtrace_mode(self, mode: BacktraceMode) -> Self
with-backtrace
only.Controls how backtraces are displayed.
The default when backtraces are enabled is BacktraceMode::Resolved
.
Sourcepub fn install_panic_hook(self)
pub fn install_panic_hook(self)
Initializes the panic hook.
After this method is called, all panics will be logged rather than printed to standard error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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