Trait flex_error::ErrorMessageTracer [−][src]
pub trait ErrorMessageTracer {
    fn new_message<E: Display>(message: &E) -> Self;
    fn add_message<E: Display>(self, message: &E) -> Self;
    fn as_error(&self) -> Option<&(dyn Error + 'static)>;
}Expand description
An ErrorMessageTracer can be used to generically trace
any error detail that implements Display.
The error tracer may add backtrace information when the tracing
methods are called. However since the error detail is required
to only implement Display, any existing error trace may be
lost even if the error detail implements Error and contains
backtrace, unless the backtrace is serialized in Display.
Required methods
fn new_message<E: Display>(message: &E) -> Self
fn new_message<E: Display>(message: &E) -> SelfCreates a new error trace, starting from a source error
detail that implements Display.
fn add_message<E: Display>(self, message: &E) -> Self
fn add_message<E: Display>(self, message: &E) -> SelfAdds new error detail to an existing trace.