Trait utils::anytrace::Context

source ·
pub trait Context<T> {
    // Required method
    fn context(self, error: Error) -> Result<T>;
}
Expand description

Trait for converting error types to a Result<T>.

Required Methods§

source

fn context(self, error: Error) -> Result<T>

Attach context to the given error.

§Errors

Propagates errors from self

Implementations on Foreign Types§

source§

impl<T> Context<T> for Option<T>

source§

fn context(self, error: Error) -> Result<T>

Implementors§

source§

impl<T> Context<T> for Result<T>