referrerpolicy=no-referrer-when-downgrade
pub trait AnnotateErrorOrigin: 'static + Send + Sync + Error {
    // Required method
    fn with_origin(self, origin: &'static str) -> Self;
}
Expand description

A trait to support the origin annotation such that errors across subsystems can be easier tracked.

Required Methods§

fn with_origin(self, origin: &'static str) -> Self

Annotate the error with a origin str.

Commonly this is used to create nested enum variants.

E::WithOrigin("I am originally from Cowtown.", E::Variant)

Object Safety§

This trait is not object safe.

Implementors§