Module io
Expand description
Helpers for IO related tasks.
Re-export of [tokio_util::io].
Structs§
- Copy
ToBytes - A helper that wraps a
Sink<Bytes>and converts it into aSink<&'a [u8]>by copying each byte slice into an ownedBytes. - Inspect
Reader - An adapter that lets you inspect the data that’s being read.
- Inspect
Writer - An adapter that lets you inspect the data that’s being written.
- Reader
Stream - Convert an
AsyncReadinto aStreamof byte chunks. - Sink
Writer - Convert a
Sinkof byte chunks into anAsyncWrite. - Stream
Reader - Convert a
Streamof byte chunks into anAsyncRead. - Sync
IoBridge - Use a [
tokio::io::AsyncRead] synchronously as astd::io::Reador a [tokio::io::AsyncWrite] synchronously as astd::io::Write.
Functions§
- poll_
read_ buf - Try to read data from an
AsyncReadinto an implementer of theBufMuttrait. - poll_
write_ buf - Try to write data from an implementer of the
Buftrait to anAsyncWrite, advancing the buffer’s internal cursor. - read_
buf - Read data from an
AsyncReadinto an implementer of theBufMuttrait. - read_
exact_ arc - Read data from an
AsyncReadinto anArc.