Struct flex_error::ErrorReport [−][src]
pub struct ErrorReport<Detail, Trace>(pub Detail, pub 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
.
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,
Trait Implementations
impl<Detail, Trace> Clone for ErrorReport<Detail, Trace> where
Detail: Clone,
Trace: Display + ErrorMessageTracer,
impl<Detail, Trace> Clone for ErrorReport<Detail, Trace> where
Detail: Clone,
Trace: Display + ErrorMessageTracer,
impl<'de, Detail, Trace> Deserialize<'de> for ErrorReport<Detail, Trace> where
Detail: Deserialize<'de>,
Trace: ErrorMessageTracer,
impl<'de, Detail, Trace> Deserialize<'de> for ErrorReport<Detail, Trace> where
Detail: Deserialize<'de>,
Trace: ErrorMessageTracer,
Deserialize this value from the given Serde deserializer. Read more
impl<Detail, Trace> Error for ErrorReport<Detail, Trace> where
Detail: Display,
Trace: Debug + Display,
Trace: ErrorMessageTracer,
impl<Detail, Trace> Error for ErrorReport<Detail, Trace> where
Detail: Display,
Trace: Debug + Display,
Trace: ErrorMessageTracer,
impl<Detail, Trace> PartialEq<ErrorReport<Detail, Trace>> for ErrorReport<Detail, Trace> where
Detail: PartialEq,
impl<Detail, Trace> PartialEq<ErrorReport<Detail, Trace>> for ErrorReport<Detail, Trace> where
Detail: PartialEq,
impl<Detail, Trace> PartialOrd<ErrorReport<Detail, Trace>> for ErrorReport<Detail, Trace> where
Detail: PartialOrd,
impl<Detail, Trace> PartialOrd<ErrorReport<Detail, Trace>> for ErrorReport<Detail, Trace> where
Detail: PartialOrd,
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<Detail, Trace> Serialize for ErrorReport<Detail, Trace> where
Detail: Serialize,
Trace: Display,
impl<Detail, Trace> Serialize for ErrorReport<Detail, Trace> where
Detail: Serialize,
Trace: Display,
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,
Blanket Implementations
Mutably borrows from an owned value. Read more