fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>
    where
        Fut: TryFuture<Ok = Option<T>, Error = Self::Error>,
        F: FnMut(Self::Ok) -> Fut,
        Self: Sized,
    {
        assert_stream::<Result<T, Self::Error>, _>(TryFilterMap::new(self, f))
    }
Attempt to filter the values produced by this stream while
simultaneously mapping them to a different type according to the
provided asynchronous closure.

As values of this stream are made available, the provided function will
be run on them. If the future returned by the predicate `f` resolves to
[`Some(item)`](Some) then the stream will yield the value `item`, but if
it resolves to [`None`] then the next value will be produced.

All errors are passed through without filtering in this combinator.

Note that this function consumes the stream passed into it and returns a
wrapped version of it, similar to the existing `filter_map` methods in
the standard library.

# Examples
```
# futures::executor::block_on(async {
use core::pin::pin;

use futures::stream;
use futures::stream::StreamExt;
use futures::stream::TryStreamExt;

let stream = stream::iter(vec![Ok(1i32), Ok(6i32), Err("error")]);
let halves = stream.try_filter_map(|x| async move {
let ret = if x % 2 == 0 { Some(x / 2) } else { None };
Ok(ret)
});

let mut halves = pin!(halves);
assert_eq!(halves.next().await, Some(Ok(3)));
assert_eq!(halves.next().await, Some(Err("error")));
# })
```
futures-util/src/stream/try_stream/mod.rs