[][src]Trait failure_ext::FutureFailureErrorExt

pub trait FutureFailureErrorExt: Future + Sized {
    pub fn context<D>(self, context: D) -> ContextErrorFut<Self, D>
    where
        D: Display + Send + Sync + 'static
;
pub 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

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

Add context to the error returned by this future

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

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...