Skip to main content

Module prelude

Module prelude 

Expand description

A “prelude” for crates using the futures crate.

This prelude is similar to the standard library’s prelude in that you’ll almost always want to import its entire contents, but unlike the standard library’s prelude you’ll have to do so manually:

use futures::prelude::*;

The prelude may grow over time as additional items see ubiquitous use.

Re-exports§

pub use prelude::FutureExt as _;
pub use prelude::TryFutureExt as _;
pub use prelude::SinkExt as _;
pub use prelude::StreamExt as _;
pub use prelude::TryStreamExt as _;
pub use prelude::AsyncBufReadExt as _;
pub use prelude::AsyncReadExt as _;
pub use prelude::AsyncSeekExt as _;
pub use prelude::AsyncWriteExt as _;

Modules§

future
Asynchronous values.
sinksink
Asynchronous sinks.
stream
Asynchronous streams.

Traits§

AsyncBufRead
Read bytes asynchronously.
AsyncRead
Read bytes asynchronously.
AsyncSeek
Seek bytes asynchronously.
AsyncWrite
Write bytes asynchronously.
Future
A future represents an asynchronous computation, commonly obtained by use of async.
Sink
A Sink is a value into which other values can be sent, asynchronously.
Stream
A stream of values produced asynchronously.
TryFuture
A convenience for futures that return Result values that includes a variety of adapters tailored to such futures.
TryStream
A convenience for streams that return Result values that includes a variety of adapters tailored to such futures.