[][src]Trait inspector::FutureInspector

pub trait FutureInspector<I, E>: Future<Item = I, Error = E> {
    fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
    where
        F: FnOnce(&'r Self::Error),
        Self: Sized
, { ... } }

Do something with the error of a future, passing it on. This combinator was implemented in futures-0.2 series (which is now dead), but never made it back to futures-0.1.x series.

Provided methods

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F> where
    F: FnOnce(&'r Self::Error),
    Self: Sized

Do something with the error of a future, passing it on.

When using futures, you'll often chain several of them together. While working on such code, you might want to check out what's happening to the errors at various parts in the pipeline. To do that, insert a call to inspect_err().

Loading content...

Implementors

impl<I, E, T> FutureInspector<I, E> for T where
    T: Future<Item = I, Error = E>, 
[src]

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F> where
    F: FnOnce(&'r Self::Error),
    Self: Sized
[src]

Loading content...