Expand description
Asynchronous I/O.
This module is the asynchronous version of std::io. It defines four
traits, AsyncRead, AsyncWrite, AsyncSeek, and AsyncBufRead,
which mirror the Read, Write, Seek, and BufRead traits of the
standard library. However, these traits integrate with the asynchronous
task system, so that if an I/O object isn’t ready for reading (or writing),
the thread is not blocked, and instead the current task is queued to be
woken when I/O is ready.
In addition, the AsyncReadExt, AsyncWriteExt, AsyncSeekExt, and
AsyncBufReadExt extension traits offer a variety of useful combinators
for operating with asynchronous I/O objects, including ways to work with
them using futures, streams and sinks.
This module is only available when the std feature of this
library is activated, and it is activated by default.
Structs
std::io::Read or std::io::Write
to be used in contexts which expect an AsyncRead or AsyncWrite.BufReader struct adds buffering to any reader.copy_buf() function.copy_buf()] function.Write::write_vectored.Read::read_vectored.BufWriter does, but prioritizes buffering linesread_exact method.AsyncRead::split.read_to_end method.read_to_string method.read_until method.read_vectored method.ReadHalf<T> and WriteHalf<T> were not two halves
of a AsyncRead + AsyncWrite, and thus could not be reunited.BufReader::seek_relative method.AsyncRead::split.write_vectored method.Enums
Traits
AsyncBufRead types.AsyncRead types.AsyncSeek types.AsyncWrite types.Functions
AbortHandle.