Trait and_then2::FutureExt[][src]

pub trait FutureExt: Future {
    fn and_then2<F, B>(self, f: F) -> AndThen2<Self, B::Future, F>
    where
        B: IntoFuture,
        F: FnOnce(Self::Item) -> B,
        Self: Sized
, { ... } }

An extension trait that provides a convenient method and_then2.

Provided Methods

Creates a future object that resolves into an item that contains a Result of a computation of the provided closure f.

It is very similar to a traditional Future::and_then, but differs in an item's type.

Might come in handy when you have futures with different error types and you don't want to collect them into an enum.

Implementors