not being found. In fact it doesn't find
futures::executors . Are these available in
The situation as of
futures-preview 0.3-alpha.* is that
std defines the
Future, but no adapters. Then
futures-preview-0.3.0-alpha.18) defines all the adapters and helper functions which use
I guess I am mightily confused between futures as they were outside of
std - and which a lot of docs online describe - and futures as they are within
Right now, there are indeed two futures.
futures crate is at version
0.1, and it defines the old-style futures. Most crates dealing with futures use this version in their current "released" versions, since the other kind is very new.
The second kind of future is
std::future::Future, which was recently stabilized. It is accompanied by combinators and adapters from the
futures-preview crate vesion
0.3-alpha.18. Git versions of
hyper, etc. use this kind of future.
futures-preview crate provides compatibility shims if you want to work with both kinds of futures - there's documentation at https://docs.rs/futures-preview/0.3.0-alpha.17/futures/compat/index.html. For example, you can import the
Compat01As03 trait, and then use
fut.compat() to turn a
futures-0.1 future into a
This has been removed in favor of the
.await syntax! More info on that decision here: https://boats.gitlab.io/blog/post/await-decision/
For std / futures-preview 0.3 futures, it's located at https://docs.rs/futures-preview/0.3.0-alpha.17/futures/executor/fn.block_on.html.
Hope that helps! Let me know if you have any more questions about this.