Skip to main content

ErrorReport

Trait ErrorReport 

Source
pub trait ErrorReport: Error {
    // Provided methods
    fn as_report(&self) -> String { ... }
    fn as_report_context(&self, context: &'static str) -> String { ... }
}
Expand description

Extends errors with a stable string representation of their source chain.

Provided Methods§

Source

fn as_report(&self) -> String

Returns a string representation of the error and its source chain.

Source

fn as_report_context(&self, context: &'static str) -> String

Creates a new root in the error chain and returns the complete error report.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Error + ?Sized> ErrorReport for T