async-std/docs/src/tutorial
bors[bot] 33ff41df48
Merge #224
224: Re-export IO traits from futures r=stjepang a=stjepang

Sorry for the big PR!

Instead of providing our own traits `async_std::io::{Read, Write, Seek, BufRead}`, we now re-export `futures::io::{AsyncRead, AsyncWrite, AsyncSeek, AsyncRead}`. While re-exporting we rename them to strip away the "Async" prefix.

The documentation will display the contents of the original traits from the `futures` crate together with our own extension methods. There's a note in the docs saying the extenion methods become available only when `async_std::prelude::*` is imported.

Our extension traits are re-exported into the prelude, but are marked with `#[doc(hidden)]` so they're completely invisible to users.

The benefit of this is that people can now implement traits from `async_std::io` for their types and stay compatible with `futures`. This will also simplify some trait bounds in our APIs - for example, things like `where Self: futures_io::AsyncRead`.

At the same time, I cleaned up some trait bounds in our stream interfaces, but haven't otherwise fiddled with them much.

I intend to follow up with another PR doing the same change for `Stream` so that we re-export the stream trait from `futures`.

Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
2019-09-22 13:50:53 +00:00
..
accept_loop.md Merge #224 2019-09-22 13:50:53 +00:00
all_together.md Rename server functions to follow *_loop convention (#139) 2019-09-20 09:54:48 +03:00
clean_shutdown.md Rename server functions to follow *_loop convention (#139) 2019-09-20 09:54:48 +03:00
connecting_readers_and_writers.md Merge #224 2019-09-22 13:50:53 +00:00
handling_disconnection.md Merge #224 2019-09-22 13:50:53 +00:00
implementing_a_client.md Fuse futures in select! 2019-09-22 15:35:53 +02:00
index.md move a-chat tutorial's code to this repo 2019-09-04 21:25:54 +03:00
receiving_messages.md Merge #224 2019-09-22 13:50:53 +00:00
sending_messages.md Merge #224 2019-09-22 13:50:53 +00:00
specification.md Add dependencies explanation to book 2019-08-22 07:53:32 -07:00