async-rs / async-std

Async version of the Rust standard library

Home Page:https://async.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to import FilterMap type

Plebshot opened this issue · comments

As title says, i'm trying to get the FilterMap type into scope to store one in a struct. It does not seem to exist on any imports although the source code shows it. It's also not showing up on docs.rs search
image

For some reason, async_std follows a pattern where Future combinator types are pub, but defined in non-pub modules. This isn't the pattern followed for Stream combinators, however.

The issue with FilterMap is that it was added to the "future" non-pub use section of

use filter_map::FilterMap;
instead of the "stream" pub use section below at
pub use chain::Chain;
.