[][src]Trait failure_ext::FutureFailureErrorExt

pub trait FutureFailureErrorExt: Future + Sized {
    fn context<D>(self, context: D) -> ContextErrorFut<Self, D>
    where
        D: Display + Send + Sync + 'static
;
fn with_context<D, F>(self, f: F) -> WithContextErrorFut<Self, F>
    where
        D: Display + Send + Sync + 'static,
        F: FnOnce() -> D
; }

"Context" support for futures where the error is anyhow::Error.

Required methods

fn context<D>(self, context: D) -> ContextErrorFut<Self, D> where
    D: Display + Send + Sync + 'static, 

Add context to the error returned by this future

fn with_context<D, F>(self, f: F) -> WithContextErrorFut<Self, F> where
    D: Display + Send + Sync + 'static,
    F: FnOnce() -> D, 

Add context created by provided function to the error returned by this future

Loading content...

Implementors

impl<F> FutureFailureErrorExt for F where
    F: Future<Error = Error> + Sized
[src]

Loading content...