Expand description
Asynchronous I/O abstractions expressed via bytesbuf types.
These types model byte sources that can be read from (Read trait) and byte sinks that can be
written to (Write trait). All operations use byte sequences represented by types from
bytesbuf instead of raw byte slices, enabling the level of flexibility required for
implementing and using high-performance I/O endpoints that consume or produce byte streams.
All operations are asynchronous and take ownership of the data/buffers passed to them, enabling efficient implementation of high-performance I/O endpoints with zero-copy semantics.
The futures-stream feature enables integration with the futures crate, providing
an adapter that exposes a Read implementation as a futures::Stream of byte sequences.
The test-util feature enables additional utilities for testing implementations of
types that produce or consume streams of bytes. These are in the testing module.
Modules§
- testing
test-util - Utilities for testing code that uses
bytesbuf_ioabstractions.
Structs§
- Error
- An error signaled by general-purpose extension logic.
- Read
AsFutures Stream futures-stream - Adapts a
Readimplementation to thefutures::StreamAPI.
Enums§
- Read
Inspect Decision - A flow control decision made during conditional reads.
Traits§
- Read
- Allows for reading of bytes.
- ReadExt
- Universal convenience methods built on top of
Read. - Write
- Allowing for writing of bytes.
- Write
Ext - Universal convenience methods built on top of
Write.