[][src]Trait fehler_more::Context

pub trait Context<T, E> {
    fn context<C>(self, context: C) -> Result<T, Exception>
    where
        C: 'static + Send + Sync + Display
;
fn with_context<C, F>(self, f: F) -> Result<T, Exception>
    where
        C: Display + Send + Sync + 'static,
        F: FnOnce(&E) -> C
; }

Provides the context method for Result.

Required methods

fn context<C>(self, context: C) -> Result<T, Exception> where
    C: 'static + Send + Sync + Display

Wrap the error value with additional context.

fn with_context<C, F>(self, f: F) -> Result<T, Exception> where
    C: Display + Send + Sync + 'static,
    F: FnOnce(&E) -> C, 

Wrap the error value with additional context lazily.

Loading content...

Implementations on Foreign Types

impl<T, E> Context<T, E> for Result<T, E> where
    E: 'static + Error + Send + Sync
[src]

impl<T> Context<T, Exception> for Result<T, Exception>[src]

Loading content...

Implementors

Loading content...