26 ms·
Ah, all the helpers around the "FSM" aspect of things are already exposed as part of the `futures` crate: https://github.com/rust-lang-nursery/futures-rs/ https
by carllerche 7y ago
Ah, all the helpers around the "FSM" aspect of things are already exposed as part of the `futures` crate: https://github.com/rust-lang-nursery/futures-rs/ https://github.com/rust-lang-nursery/futures-rs/
- MuffinFlavored 7y agoWhich is different than the standard adopted `std::futures`?
- shepmaster 7y agoNot quite. The futures crate, version 0.1, contained a definition of the `Future` trait and a bunch of the combinator methods. This was iterated on a lot. Eventually, the bare minimum traits were added to the standard library. The futures crate, version 0.3 (released under the name `futures-preview` right now with an alpha version number), contains the helper methods for the standard library's trait.
- autumnal 7y agoJust the bare minimum traits required for built-in async/.await, right?
- steveklabnik 7y agoNo; it re-exports the standard futures. Its purpose is two-fold: one, it's where futures were experimented with before they got into std, and two, it's where extra functionality can live. We only put what was absolutely necessary into std.