pub trait ErrorDisplay: Sealed {
// Required method
fn full_display(&self, f: &mut impl Write) -> Result;
// Provided methods
fn brief_display(&self, f: &mut impl Write) -> Result { ... }
fn human_readable_display(&self, f: &mut impl Write) -> Result { ... }
fn full_stringify(&self) -> String { ... }
fn brief_stringify(&self) -> String { ... }
fn human_readable_stringify(&self) -> String { ... }
}Expand description
In-one error display trait.
This trait is pub so that you can stringify the error,
but you’re not supposed to implement this trait for external types.
Required Methods§
Sourcefn full_display(&self, f: &mut impl Write) -> Result
fn full_display(&self, f: &mut impl Write) -> Result
Full description of the error.
Provided Methods§
Sourcefn brief_display(&self, f: &mut impl Write) -> Result
fn brief_display(&self, f: &mut impl Write) -> Result
Brief description of the error.
Sourcefn human_readable_display(&self, f: &mut impl Write) -> Result
fn human_readable_display(&self, f: &mut impl Write) -> Result
Human-readable display of the error.
Sourcefn full_stringify(&self) -> String
fn full_stringify(&self) -> String
Display the error fully and write it to a String.
Sourcefn brief_stringify(&self) -> String
fn brief_stringify(&self) -> String
Display the error briefly and write it to a String.
Sourcefn human_readable_stringify(&self) -> String
fn human_readable_stringify(&self) -> String
Display the error in a human-readable way and write it to a String.
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.