Introduce several concrete future types. (#433)

* multisteam-select: introduce `DialerFuture`.

* multistream-select: add more concrete futures.

* multistream-select: add ListenerFuture.

* multistream-select: add ListenerSelectFuture

* Formatting.

* Add DialerSelectFuture type alias.

* Add UpgradeApplyFuture and NegotiationFuture.

* In iterator wrappers also pass-through size_hint.

* Minor refactoring.

* Address review comments.

* Add some comments.

* Hide state enums in wrapping structs.
This commit is contained in:
Toralf Wittner
2018-08-30 23:25:16 +02:00
committed by GitHub
parent f457ca5490
commit c02dea8128
7 changed files with 665 additions and 249 deletions

View File

@ -113,6 +113,7 @@
//! ```
extern crate bytes;
#[macro_use]
extern crate futures;
#[macro_use]
extern crate log;
@ -128,6 +129,6 @@ mod tests;
pub mod protocol;
pub use self::dialer_select::dialer_select_proto;
pub use self::dialer_select::{dialer_select_proto, DialerSelectFuture};
pub use self::error::ProtocolChoiceError;
pub use self::listener_select::listener_select_proto;
pub use self::listener_select::{listener_select_proto, ListenerSelectFuture};