Skip to main content

ErrorTrace

Trait ErrorTrace 

Source
pub trait ErrorTrace {
    // Required methods
    fn type_name(&self) -> &'static str;
    fn variant(&self) -> String;
    fn message(&self) -> &str;
    fn backtrace(&self) -> Option<&Backtrace>;
    fn location(&self) -> Option<&'static Location<'static>>;
    fn span_trace(&self) -> &SpanTrace;
}
Expand description

Object-safe view over an error, letting base render types defined in dependent crates.

Required Methods§

Source

fn type_name(&self) -> &'static str

Short type name, e.g. "ChatbotError".

Source

fn variant(&self) -> String

Error-type variant, via its Debug.

Source

fn message(&self) -> &str

Human-facing message.

Source

fn backtrace(&self) -> Option<&Backtrace>

Captured OS backtrace, if any.

Source

fn location(&self) -> Option<&'static Location<'static>>

Captured raise location, if any.

Source

fn span_trace(&self) -> &SpanTrace

Captured tracing span trace.

Implementors§

Source§

impl<T: BackendError> ErrorTrace for T

Every BackendError is an ErrorTrace. The type name is derived from std::any::type_name and reduced to its last path segment.