Expand description
Combinators and utilities for working with Futures, Streams, Sinks,
and the AsyncRead and AsyncWrite traits.
Re-exports§
pub use crate::future::Future;pub use crate::future::FutureExt;pub use crate::future::TryFuture;pub use crate::future::TryFutureExt;pub use crate::stream::Stream;pub use crate::stream::StreamExt;pub use crate::stream::TryStream;pub use crate::stream::TryStreamExt;pub use crate::sink::Sink;sinkpub use crate::sink::SinkExt;sinkpub use crate::io::AsyncBufRead;ioandstdpub use crate::io::AsyncBufReadExt;ioandstdpub use crate::io::AsyncRead;ioandstdpub use crate::io::AsyncReadExt;ioandstdpub use crate::io::AsyncSeek;ioandstdpub use crate::io::AsyncSeekExt;ioandstdpub use crate::io::AsyncWrite;ioandstdpub use crate::io::AsyncWriteExt;ioandstd
Modules§
- compat
compat - Interop between
futures0.1 and 0.3. - future
- Asynchronous values.
- io
io - Asynchronous I/O.
- lock
alloc - Futures-powered synchronization primitives.
- never
- This module contains the
Nevertype. - sink
sink - Asynchronous sinks.
- stream
- Asynchronous streams.
- task
- Tools for working with tasks.
Macros§
- join
async-await-macroandasync-await - Polls multiple futures simultaneously, returning a tuple of all results once complete.
- pending
async-await - A macro which yields to the event loop once.
- pin_mut
- Pins a value on the stack.
- poll
async-await - A macro which returns the result of polling a future once within the
current
asynccontext. - ready
- Extracts the successful type of
Poll<T>. - select
async-await-macroandasync-awaitandstd - 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 beUnpinand implementFusedFuture. - select_
biased async-await-macroandasync-await - 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 toselect_biased!must beUnpinand implementFusedFuture. - stream_
select async-await-macroandasync-awaitandstd - Combines several streams, all producing the same
Itemtype, into one stream. This is similar toselect_allbut does not require the streams to all be the same type. It also keeps the streams inline, and does not requireBox<dyn Stream>s to be allocated. Streams passed to this macro must beUnpin. - try_
join async-await-macroandasync-await - Polls multiple futures simultaneously, resolving to a
Resultcontaining either a tuple of the successful outputs or an error.