pub trait PanicWriter {
type Config;
// Required method
unsafe fn create_panic_writer(config: Self::Config) -> impl IoWrite + Write;
}Expand description
Interface for chips to create a synchronous writer for panics.
Any mechanism that can output a panic message during a panic must implement
PanicWriter to enable the panic() functions to write the output. This
requires the mechanism to provide a new constructor for the writer that
creates a synchronous writer that implements IoWrite.
This is a dedicated trait because synchronous I/O is only used for panic handling. This allows chips to clearly separate synchronous implementations that are a special case only for panics.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".