Skip to main content

AddContext

Trait AddContext 

Source
pub trait AddContext {
    // Required method
    fn context<S: Into<String>>(self, ctx: S) -> Self;
}

Required Methods§

Source

fn context<S: Into<String>>(self, ctx: S) -> Self

Add context to the error-carrying type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> AddContext for Result<T, Error>

Source§

fn context<S: Into<String>>(self, ctx: S) -> Self

Source§

impl<T> AddContext for Result<T, ErrorKind>

Source§

fn context<S: Into<String>>(self, ctx: S) -> Self

Implementors§