async_macros/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
//! Macros for async-std.
//!
//! # Examples
//!
//! ```
//! # futures::executor::block_on(async {
//! use async_macros::join;
//! use futures::future;
//!
//! let a = future::ready(1u8);
//! let b = future::ready(2u8);
//!
//! assert_eq!(join!(a, b).await, (1, 2));
//! # });
//! ```
#![forbid(future_incompatible, rust_2018_idioms)]
#![deny(missing_debug_implementations, nonstandard_style)]
#![warn(missing_docs, unreachable_pub)]
#![cfg_attr(test, deny(warnings))]
mod join;
mod join_stream;
mod maybe_done;
mod poll_fn;
mod ready;
mod select;
mod try_join;
mod try_select;
pub use join_stream::JoinStream;
pub use maybe_done::MaybeDone;
/// Helper re-exports for use in macros.
pub mod utils {
pub use super::poll_fn::poll_fn;
pub use core::{future, pin, result, task};
}