[−][src]Struct better_panic::Settings
Configuration for panic printing.
Methods
impl Settings
[src]
pub fn new() -> Self
[src]
Alias for Settings::default
.
pub fn debug() -> Self
[src]
Common settings for debugging.
pub fn auto() -> Self
[src]
In release builds this is new
, in debug builds this is debug
.
pub fn message(self, message: impl Into<String>) -> Self
[src]
Controls the "greeting" message of the panic.
Defaults to "The application panicked (crashed)"
.
pub fn verbosity(self, v: Verbosity) -> Self
[src]
Controls the verbosity level.
Defaults to Verbosity::get_env()
.
pub fn backtrace_first(self, value: bool) -> Self
[src]
Controls the backtrace position.
Defaults to true
which causes the backtrace to be printed above
the panic.
pub fn most_recent_first(self, value: bool) -> Self
[src]
Controls the most-recent-first behavior.
Defaults to true
which causes the backtrace to be printed above
the panic.
pub fn lineno_suffix(self, value: bool) -> Self
[src]
Append the line number as suffix to the filename.
Defaults to false
which causes line numbers to be rendered separately.
Specifically this renders File "foo.rs:42"
instead of
File "foo.rs", line 42
which lets some terminals open the editor
at the right location on click.
pub fn create_panic_handler(
self
) -> Box<dyn Fn(&PanicInfo) + Sync + Send + 'static>
[src]
self
) -> Box<dyn Fn(&PanicInfo) + Sync + Send + 'static>
Consumes the settings and creates a panic handler.
pub fn install(self)
[src]
Installs the panic handler.
Trait Implementations
impl Clone for Settings
[src]
fn clone(&self) -> Settings
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Settings
[src]
impl Debug for Settings
[src]
Auto Trait Implementations
impl Unpin for Settings
impl Sync for Settings
impl Send for Settings
impl !RefUnwindSafe for Settings
impl !UnwindSafe for Settings
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,