| 1 |
//! Await |
| 2 |
//! |
| 3 |
//! This module contains a number of functions and combinators for working |
| 4 |
//! with `async`/`await` code. |
| 5 |
|
| 6 |
use futures_core::future::{FusedFuture, Future}; |
| 7 |
use futures_core::stream::{FusedStream, Stream}; |
| 8 |
|
| 9 |
#[macro_use] |
| 10 |
mod poll; |
| 11 |
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/64762 |
| 12 |
pub use self::poll::*; |
| 13 |
|
| 14 |
#[macro_use] |
| 15 |
mod pending; |
| 16 |
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/64762 |
| 17 |
pub use self::pending::*; |
| 18 |
|
| 19 |
// Primary export is a macro |
| 20 |
#[cfg(feature = "async-await-macro")] |
| 21 |
mod join_mod; |
| 22 |
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/64762 |
| 23 |
#[cfg(feature = "async-await-macro")] |
| 24 |
pub use self::join_mod::*; |
| 25 |
|
| 26 |
// Primary export is a macro |
| 27 |
#[cfg(feature = "async-await-macro")] |
| 28 |
mod select_mod; |
| 29 |
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/64762 |
| 30 |
#[cfg(feature = "async-await-macro")] |
| 31 |
pub use self::select_mod::*; |
| 32 |
|
| 33 |
// Primary export is a macro |
| 34 |
#[cfg(feature = "std")] |
| 35 |
#[cfg(feature = "async-await-macro")] |
| 36 |
mod stream_select_mod; |
| 37 |
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/64762 |
| 38 |
#[cfg(feature = "std")] |
| 39 |
#[cfg(feature = "async-await-macro")] |
| 40 |
pub use self::stream_select_mod::*; |
| 41 |
|
| 42 |
#[cfg(feature = "std")] |
| 43 |
#[cfg(feature = "async-await-macro")] |
| 44 |
mod random; |
| 45 |
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/64762 |
| 46 |
#[cfg(feature = "std")] |
| 47 |
#[cfg(feature = "async-await-macro")] |
| 48 |
pub use self::random::*; |
| 49 |
|
| 50 |
#[doc(hidden)] |
| 51 |
#[inline(always)] |
| 52 |
pub fn assert_unpin<T: Unpin>(_: &T) {} |
| 53 |
|
| 54 |
#[doc(hidden)] |
| 55 |
#[inline(always)] |
| 56 |
pub fn assert_fused_future<T: Future + FusedFuture>(_: &T) {} |
| 57 |
|
| 58 |
#[doc(hidden)] |
| 59 |
#[inline(always)] |
| 60 |
pub fn assert_fused_stream<T: Stream + FusedStream>(_: &T) {} |