ErrorContextDisplay

Trait ErrorContextDisplay 

Source
pub trait ErrorContextDisplay<T> {
    // Required methods
    fn kind_disp(self, kind: T) -> UniError<T>;
    fn context_disp(self, context: impl Into<Cow<'static, str>>) -> UniError<T>
       where T: Default;
    fn kind_context_disp(
        self,
        kind: T,
        context: impl Into<Cow<'static, str>>,
    ) -> UniError<T>;
    fn wrap_disp(self) -> UniError<T>
       where T: Default;
}
Expand description

A trait for wrapping an existing error with a additional context (for Display types).

Required Methods§

Source

fn kind_disp(self, kind: T) -> UniError<T>

Wraps the existing error with the provided kind (for Display types).

Source

fn context_disp(self, context: impl Into<Cow<'static, str>>) -> UniError<T>
where T: Default,

Wraps the existing error with the provided context (for Display types).

Source

fn kind_context_disp( self, kind: T, context: impl Into<Cow<'static, str>>, ) -> UniError<T>

Wraps the existing error with the provided kind and context (for Display types).

Source

fn wrap_disp(self) -> UniError<T>
where T: Default,

Wraps the existing error with no additional context (for Display types).

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.

Implementors§