Expand description
Bytes and Buffer Management
Zero-copy buffer types providing the foundation for efficient network I/O, codec implementations, and protocol parsing.
§Overview
This module provides:
Bytes: Immutable, reference-counted byte slice with cheap cloningBytesMut: Mutable buffer with efficient growth and splittingBuf: Trait for reading bytes from a bufferBufMut: Trait for writing bytes to a buffer
§Design Notes
Unlike the bytes crate, this implementation uses safe Rust throughout,
avoiding raw pointers in favor of Arc<Vec<u8>> and Vec<u8>. This
trades some performance for safety, alignment with asupersync’s
#![forbid(unsafe_code)] policy, and simplicity.
§Cancel-Safety
Buffer operations are synchronous and thus inherently cancel-safe. No async operations are involved in buffer manipulation.
Re-exports§
Modules§
- buf
- Buffer traits for reading and writing bytes.
Structs§
- Bytes
- Immutable byte slice with cheap cloning.
- Bytes
Cursor - A cursor for reading from Bytes.
- Bytes
Mut - Mutable buffer that can be frozen into
Bytes.