pub struct Settings { /* private fields */ }
Expand description
Configuration for panic printing.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn message(self, message: impl Into<String>) -> Self
pub fn message(self, message: impl Into<String>) -> Self
Controls the “greeting” message of the panic.
Defaults to "The application panicked (crashed)"
.
Sourcepub fn verbosity(self, v: Verbosity) -> Self
pub fn verbosity(self, v: Verbosity) -> Self
Controls the verbosity level.
Defaults to Verbosity::get_env()
.
Sourcepub fn backtrace_first(self, value: bool) -> Self
pub fn backtrace_first(self, value: bool) -> Self
Controls the backtrace position.
Defaults to true
which causes the backtrace to be printed above
the panic.
Sourcepub fn most_recent_first(self, value: bool) -> Self
pub fn most_recent_first(self, value: bool) -> Self
Controls the most-recent-first behavior.
Defaults to true
which causes the backtrace to be printed above
the panic.
Sourcepub fn lineno_suffix(self, value: bool) -> Self
pub fn lineno_suffix(self, value: bool) -> Self
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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