fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
    where
        F: FnOnce(Self::Ok) -> Fut,
        Fut: TryFuture<Error = Self::Error>,
        Self: Sized,
    {
        assert_future::<Result<Fut::Ok, Fut::Error>, _>(AndThen::new(self, f))
    }
Executes another future after this one resolves successfully. The
success value is passed to a closure to create this subsequent future.

The provided closure `f` will only be called if this future is resolved
to an [`Ok`]. If this future resolves to an [`Err`], panics, or is
dropped, then the provided closure will never be invoked. The
[`Error`](TryFuture::Error) type of this future and the future
returned by `f` have to match.

Note that this method consumes the future it is called on and returns a
wrapped version of it.

# Examples

```
use futures::future::TryFutureExt;

# futures::executor::block_on(async {
let future = async { Ok::<i32, i32>(1) };
let future = future.and_then(|x| async move { Ok::<i32, i32>(x + 3) });
assert_eq!(future.await, Ok(4));
# });
```

Calling [`and_then`](TryFutureExt::and_then) on an errored future has no
effect:

```
use futures::future::TryFutureExt;

# futures::executor::block_on(async {
let future = async { Err::<i32, i32>(1) };
let future = future.and_then(|x| async move { Err::<i32, i32>(x + 3) });
assert_eq!(future.await, Err(1));
# });
```
futures-util/src/future/try_future/mod.rs