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