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§
Sourcefn as_report(&self) -> String
fn as_report(&self) -> String
Returns a string representation of the error and its source chain.
Sourcefn as_report_context(&self, context: &'static str) -> String
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".