struct PanicFormatter { ... }

Small formatter with as few dependencies as possible.

PanicFormatter has no buffering, no checking for unwritten bytes. It just writes directly to fd 2. This is both for reliability, to allow higher-level IO code to panic safely but also to break potential circular dependencies in static initialization.

If the buffer is provided, it will write the message there instead. This is used to capture the panics when using managed threads and during constant evaluation. Unlike SliceFormatter, this will try to write as much as possible to the buffer, even if it is not large enough to hold the entire message.

Fields

Methods

impl PanicFormatter { ... }

Mixins

impl PanicFormatter { ... }