[][src]Trait failure_ext::StreamFailureErrorExt

pub trait StreamFailureErrorExt: Stream + Sized {
    fn context<D>(self, context: D) -> ContextErrorStream<Self, D>
    where
        D: Display + Clone + Send + Sync + 'static
;
fn with_context<D, F>(self, f: F) -> WithContextErrorStream<Self, F>
    where
        D: Display + Clone + Send + Sync + 'static,
        F: FnMut() -> D
; }

"Context" support for streams where the error is an implementation of anyhow::Error.

Required methods

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

Add context to the error returned by this stream

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

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

Loading content...

Implementors

impl<S> StreamFailureErrorExt for S where
    S: Stream<Error = Error> + Sized
[src]

Loading content...