pub trait PanicInfoExt<'a> {
// Required method
fn panic_message(&'a self) -> impl Message + 'a;
// Provided method
fn panic_details(&'a self) -> PanicDetails<'a, impl Message + 'a> { ... }
}
Expand description
Extension trait to provide better API for PanicInfo
Required Methods§
Sourcefn panic_message(&'a self) -> impl Message + 'a
fn panic_message(&'a self) -> impl Message + 'a
Retrieves underlying panic message
Provided Methods§
Sourcefn panic_details(&'a self) -> PanicDetails<'a, impl Message + 'a>
fn panic_details(&'a self) -> PanicDetails<'a, impl Message + 'a>
Access uniform details of panic
Default implementation uses location of this function call. When panic location is known, it is overridden with specialized version
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.