Skip to main content

Crate futures_util

Crate futures_util 

Source
Expand description

Combinators and utilities for working with Futures, Streams, Sinks, and the AsyncRead and AsyncWrite traits.

Re-exports§

pub use futures_util::Future;
pub use futures_util::FutureExt;
pub use futures_util::TryFuture;
pub use futures_util::TryFutureExt;
pub use futures_util::Stream;
pub use futures_util::StreamExt;
pub use futures_util::TryStream;
pub use futures_util::TryStreamExt;

Macros§

join
Polls multiple futures simultaneously, returning a tuple of all results once complete.
join_internal
The join! macro.
pending
A macro which yields to the event loop once.
pin_mut
Pins a value on the stack.
poll
A macro which returns the result of polling a future once within the current async context.
ready
Extracts the successful type of Poll<T>.
select
Polls multiple futures and streams simultaneously, executing the branch for the future that finishes first. If multiple futures are ready, one will be pseudo-randomly selected at runtime. Futures directly passed to select! must be Unpin and implement FusedFuture.
select_biased
Polls multiple futures and streams simultaneously, executing the branch for the future that finishes first. Unlike select!, if multiple futures are ready, one will be selected in order of declaration. Futures directly passed to select_biased! must be Unpin and implement FusedFuture.
select_biased_internal
The select_biased! macro.
select_internal
The select! macro.
stream_select
Combines several streams, all producing the same Item type, into one stream. This is similar to select_all but does not require the streams to all be the same type. It also keeps the streams inline, and does not require Box<dyn Stream>s to be allocated. Streams passed to this macro must be Unpin.
stream_select_internal
The stream_select! macro.
try_join
Polls multiple futures simultaneously, resolving to a Result containing either a tuple of the successful outputs or an error.
try_join_internal
The try_join! macro.