Module io

Source
Expand description

IO traits

Modules§

as_fd
We impl AsReadFd and AsWriteFd for some structs.
poll_io
Traits, helpers, and type definitions for asynchronous I/O functionality.
sink
Sink trait in GAT style.
stream
Stream trait in GAT style.

Structs§

BufReader
BufReader is a struct with a buffer. BufReader implements AsyncBufRead and AsyncReadRent, and if the inner io implements AsyncWriteRent, it will delegate the implementation.
BufWriter
BufWriter is a struct with a buffer. BufWriter implements AsyncWriteRent, and if the inner io implements AsyncReadRent, it will delegate the implementation.
CancelHandle
CancelHandle is used to pass to io actions with CancelableAsyncReadRent. Create a CancelHandle with Canceller::handle.
Canceller
Canceller is a user-hold struct to cancel io operations. A canceller can associate with multiple io operations.
OwnedReadHalf
Owned Read Half Part
OwnedWriteHalf
Owned Write Half Part
PrefixedReadIo
PrefixedReadIO facilitates the addition of a prefix to an IO stream, enabling stream rewinding and peeking capabilities. Subsequent reads will preserve access to the original stream contents.

Traits§

AsyncBufRead
AsyncBufRead: async read with buffered content
AsyncBufReadExt
AsyncBufReadExt
AsyncReadRent
The AsyncReadRent trait defines asynchronous reading operations for objects that implement it.
AsyncReadRentAt
AsyncReadRentAt: async read with a ownership of a buffer and a position
AsyncReadRentExt
AsyncReadRentExt
AsyncWriteRent
The AsyncWriteRent trait provides asynchronous writing capabilities for structs that implement it.
AsyncWriteRentAt
AsyncWriteRentAt: async write with a ownership of a buffer and a position
AsyncWriteRentExt
AsyncWriteRentExt
CancelableAsyncReadRent
CancelableAsyncReadRent: async read with a ownership of a buffer and ability to cancel io.
CancelableAsyncReadRentExt
CancelableAsyncReadRentExt
CancelableAsyncWriteRent
CancelableAsyncWriteRent: async write with a ownership of a buffer and ability to cancel io.
CancelableAsyncWriteRentExt
CancelableAsyncWriteRentExt
IntoCompIo
Convert a poll-based io to a completion-based io.
IntoPollIo
Convert a completion-based io to a poll-based io.
Split
This is a dummy unsafe trait to inform monoio, the object with has this Split trait can be safely split to read/write object in both form of Owned or Borrowed.
Splitable
Inner split trait

Functions§

copy
Copy data from reader to writer.