[][src]Trait failure_ext::StreamFailureExt

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

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

Required methods

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

Add context to the error returned by this stream

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

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

Loading content...

Implementors

impl<S> StreamFailureExt for S where
    S: Stream + Sized,
    S::Error: StdError + Send + Sync + 'static, 
[src]

Loading content...