Module io

Expand description

Helpers for IO related tasks.

Re-export of [tokio_util::io].

Structs§

CopyToBytes
A helper that wraps a Sink<Bytes> and converts it into a Sink<&'a [u8]> by copying each byte slice into an owned Bytes.
InspectReader
An adapter that lets you inspect the data that’s being read.
InspectWriter
An adapter that lets you inspect the data that’s being written.
ReaderStream
Convert an AsyncRead into a Stream of byte chunks.
SinkWriter
Convert a Sink of byte chunks into an AsyncWrite.
StreamReader
Convert a Stream of byte chunks into an AsyncRead.
SyncIoBridge
Use a [tokio::io::AsyncRead] synchronously as a std::io::Read or a [tokio::io::AsyncWrite] synchronously as a std::io::Write.

Functions§

poll_read_buf
Try to read data from an AsyncRead into an implementer of the BufMut trait.
poll_write_buf
Try to write data from an implementer of the Buf trait to an AsyncWrite, advancing the buffer’s internal cursor.
read_buf
Read data from an AsyncRead into an implementer of the BufMut trait.
read_exact_arc
Read data from an AsyncRead into an Arc.