lazy_panic::formatter

Trait PanicFormat

Source
pub trait PanicFormat {
    type Writer: Write;
    type Backtrace: Backtrace;
    type Prefix: Prefix;
    type PanicInfo: PanicInfo;
    type Suffix: Suffix;

    // Required method
    fn writer() -> Self::Writer;

    // Provided method
    fn print(info: &PanicInfo<'_>) { ... }
}
Expand description

Panic formatter

Default print method writes each component in following order:

  1. Backtrace
  2. Prefix
  3. PanicInfo
  4. Suffix

Required Associated Types§

Required Methods§

Source

fn writer() -> Self::Writer

Provided Methods§

Source

fn print(info: &PanicInfo<'_>)

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.

Implementors§