[][src]Trait fehler::Context

pub trait Context<T, E> {
    fn context<C: Display + Send + Sync + 'static>(
        self,
        context: C
    ) -> Result<T, Exception>;
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: Display + Send + Sync + 'static>(
    self,
    context: C
) -> Result<T, Exception>

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: Error + Send + Sync + 'static> Context<T, E> for Result<T, E>[src]

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

Loading content...

Implementors

Loading content...