Struct flex_error::ErrorReport [−][src]
pub struct ErrorReport<Detail, Trace> { pub detail: Detail, pub trace: Trace, }
Expand description
An ErrorSource
that provides both the error
detail and error trace separately. The error trace in an error report
also already contains the trace of the current error detail already.
so new errors that arise from an ErrorReport
only need to access
the trace
object to add new traces to it.
ErrorReport
should be used for all application code that uses flex-error
.
When defining new error types using define_error!
, the error name is defined
as a type alias to ErrorReport
.
Fields
detail: Detail
trace: Trace
Implementations
pub fn trace_from<E, Cont>(source: E::Source, cont: Cont) -> Self where
Detail: Display,
E: ErrorSource<Trace>,
Trace: ErrorMessageTracer,
Cont: FnOnce(E::Detail) -> Detail,
[src]Trait Implementations
impl<Detail, Trace> Error for ErrorReport<Detail, Trace> where
Detail: Display,
Trace: Debug + Display,
Trace: ErrorMessageTracer,
[src]
impl<Detail, Trace> Error for ErrorReport<Detail, Trace> where
Detail: Display,
Trace: Debug + Display,
Trace: ErrorMessageTracer,
[src]Auto Trait Implementations
impl<Detail, Trace> RefUnwindSafe for ErrorReport<Detail, Trace> where
Detail: RefUnwindSafe,
Trace: RefUnwindSafe,
impl<Detail, Trace> Send for ErrorReport<Detail, Trace> where
Detail: Send,
Trace: Send,
impl<Detail, Trace> Sync for ErrorReport<Detail, Trace> where
Detail: Sync,
Trace: Sync,
impl<Detail, Trace> Unpin for ErrorReport<Detail, Trace> where
Detail: Unpin,
Trace: Unpin,
impl<Detail, Trace> UnwindSafe for ErrorReport<Detail, Trace> where
Detail: UnwindSafe,
Trace: UnwindSafe,