Trait ErrorContext

Source
pub(crate) trait ErrorContext {
    // Required method
    fn context<C: Display>(self, context: C) -> Self;
}
Expand description

Prepend Error messages by context.

Trait for Error objects that allows prepending their error messages by something that gives context.

Required Methods§

Source

fn context<C: Display>(self, context: C) -> Self

Prepend the error by context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ErrorContext for Error

Source§

fn context<C: Display>(self, context: C) -> Self

Implementors§