ErrorDisplay

Trait ErrorDisplay 

Source
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§

Source

fn full_display(&self, f: &mut impl Write) -> Result

Full description of the error.

Provided Methods§

Source

fn brief_display(&self, f: &mut impl Write) -> Result

Brief description of the error.

Source

fn human_readable_display(&self, f: &mut impl Write) -> Result

Human-readable display of the error.

Source

fn full_stringify(&self) -> String

Display the error fully and write it to a String.

Source

fn brief_stringify(&self) -> String

Display the error briefly and write it to a String.

Source

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.

Implementors§