Rust `AsyncRead` Link Aggregation

The async ecosystem in rust isn’t fully developed yet and in a somewhat experimental/unstable stage.
Specifically, there’s no consensus yet on the trait used for streaming bytes.
Mainly, there exists tokio’s AsyncRead and future-rs’s future::io::AsyncRead.

This is a link aggregation on related information:

Various traits & code

Supposedly the traits in futures, async_std and smol are the same.
Supposedly the futures trait is the most likely to make it into rust’s std library.
The changes in tokio’s AsyncRead also apply to rust std’s Read trait, so may make it into std together at a later point in time.

To actually see what you can do with these traits, look for the -Ext variants (e.g. AsyncReadExt), similar to how Stream has StreamExt.

tokio_util::compat - Rust is a compatibility trait for these tokio-based traits and the others.

History

These are some PR/issue links I picked up along the way, sorted by time from oldest to most recent.

Discussions