mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
io: fix incorrect and confusing AsyncWrite documentation (#7875)
This commit is contained in:
@@ -27,11 +27,10 @@ use std::task::{Context, Poll};
|
||||
/// * `Poll::Ready(Err(e))` for other errors are standard I/O errors coming from the
|
||||
/// underlying object.
|
||||
///
|
||||
/// This trait importantly means that the `write` method only works in the
|
||||
/// context of a future's task. The object may panic if used outside of a task.
|
||||
///
|
||||
/// Utilities for working with `AsyncWrite` values are provided by
|
||||
/// [`AsyncWriteExt`].
|
||||
/// [`AsyncWriteExt`]. Most users will interact with `AsyncWrite` types through
|
||||
/// these extension methods, which provide ergonomic async functions such as
|
||||
/// `write_all` and `flush`.
|
||||
///
|
||||
/// [`std::io::Write`]: std::io::Write
|
||||
/// [`Write::write`]: std::io::Write::write()
|
||||
|
||||
Reference in New Issue
Block a user