Crate async_macros

Source
Expand description

Macros for async-std.

§Examples

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));

Modules§

utils
Helper re-exports for use in macros.

Macros§

join
Awaits multiple futures simultaneously, returning all results once complete.
join_stream
Combines multiple streams into a single stream of all their outputs.
ready
Extracts the successful type of a Poll<T>.
select
Waits for either one of several similarly-typed futures to complete.
try_join
Awaits multiple fallible futures simultaneously, returning all results once complete.
try_select
Waits for either one of several similarly-typed futures to complete.

Structs§

JoinStream
A stream joining two or more streams.

Enums§

MaybeDone
A future that may have completed.