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 = "std")]
35#[cfg(feature = "async-await-macro")]
36mod 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")]
40pub use self::stream_select_mod::*;
41
42#[cfg(feature = "std")]
43#[cfg(feature = "async-await-macro")]
44mod random;
45#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/64762
46#[cfg(feature = "std")]
47#[cfg(feature = "async-await-macro")]
48pub use self::random::*;
49
50#[doc(hidden)]
51#[inline(always)]
52pub fn assert_unpin<T: Unpin>(_: &T) {}
53
54#[doc(hidden)]
55#[inline(always)]
56pub fn assert_fused_future<T: Future + FusedFuture>(_: &T) {}
57
58#[doc(hidden)]
59#[inline(always)]
60pub fn assert_fused_stream<T: Stream + FusedStream>(_: &T) {}
61