Trait tor_error::report::ErrorReport
source · pub trait ErrorReport: Sealed + StdError + 'static {
// Required method
fn report(&self) -> Report<ReportHelper<'_>>;
}
Expand description
Extension trait providing .report()
method on concrete errors
This is implemented for types that directly implement std::error::Error
+ 'static
.
For types like anyhow::Error
that impl Deref<Target = dyn Error...>
,
you can use tor_error::Report(err)
directly,
but you can also call .report()
via the impl of this trait for dyn Error
.
Required Methods§
sourcefn report(&self) -> Report<ReportHelper<'_>>
fn report(&self) -> Report<ReportHelper<'_>>
Return an object that displays the error and its causes
Implementations on Foreign Types§
source§impl ErrorReport for dyn StdError + Send + Sync
impl ErrorReport for dyn StdError + Send + Sync
Implementation for anyhow::Error
, which derefs to dyn StdError
.