pub trait ErrorToString {
// Required method
fn error_to_string_impl(&self, stream: &mut dyn Write) -> Result;
}Expand description
C++ errorToString<T> is an if constexpr switch over the concrete error
type. Rust models the per-type compile-time dispatch with a trait
implemented once per error record; the generic function delegates to it.
Required Methods§
fn error_to_string_impl(&self, stream: &mut dyn Write) -> Result
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".