Module futures
Expand description
Re-export of the futures and asynk-strim crates.
Exported for your convenience and because it is so fundamental to rama.
Modules§
- async_
stream - asynk-strim
- channel
- Asynchronous channels.
- executor
- Built-in executors and related tools.
- io
- Asynchronous I/O.
- lock
- Futures-powered synchronization primitives.
- never
- This module contains the
Nevertype. - prelude
- A “prelude” for crates using the
futurescrate. - task
- Tools for working with tasks.
Macros§
- join
- Polls multiple futures simultaneously, returning a tuple of all results once complete.
- 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
asynccontext. - ready
- Extracts the successful type of a
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 beUnpinand implementFusedFuture. - 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 toselect_biased!must beUnpinand implementFusedFuture. - stream_
select - 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 - Polls multiple futures simultaneously, resolving to a
Resultcontaining either a tuple of the successful outputs or an error.
Structs§
Traits§
- Async
BufRead - Read bytes asynchronously.
- Async
BufRead Ext - An extension trait which adds utility methods to
AsyncBufReadtypes. - Async
Read - Read bytes asynchronously.
- Async
Read Ext - An extension trait which adds utility methods to
AsyncReadtypes. - Async
Seek - Seek bytes asynchronously.
- Async
Seek Ext - An extension trait which adds utility methods to
AsyncSeektypes. - Async
Write - Write bytes asynchronously.
- Async
Write Ext - An extension trait which adds utility methods to
AsyncWritetypes. - Future
- A future represents an asynchronous computation, commonly obtained by use of
async. - Future
Ext - An extension trait for
Futures that provides a variety of convenient adapters. - Sink
- A
Sinkis a value into which other values can be sent, asynchronously. - SinkExt
- An extension trait for
Sinks that provides a variety of convenient combinator functions. - Stream
- A stream of values produced asynchronously.
- Stream
Ext - An extension trait for
Streams that provides a variety of convenient combinator functions. - TryFuture
- A convenience for futures that return
Resultvalues that includes a variety of adapters tailored to such futures. - TryFuture
Ext - Adapters specific to
Result-returning futures - TryStream
- A convenience for streams that return
Resultvalues that includes a variety of adapters tailored to such futures. - TryStream
Ext - Adapters specific to
Result-returning streams