Skip to main content

Module iobuf

Module iobuf 

Source
Expand description

Buffer types for I/O operations.

Each buffer type is backed by one of three storage variants:

  • Bytes/BytesMut: standard heap allocation (from From conversions)
  • Aligned: untracked aligned allocation (from IoBufMut::with_alignment, pool bypass for small requests, or fallback)
  • Pooled: tracked aligned allocation returned to a BufferPool on drop

Public types:

  • IoBuf: Immutable byte buffer
  • IoBufMut: Mutable byte buffer
  • IoBufs: Container for one or more immutable buffers
  • IoBufsMut: Container for one or more mutable buffers
  • BufferPool: Pool of reusable, aligned buffers

Structs§

BufferPool
A pool of reusable, aligned buffers.
BufferPoolConfig
Configuration for a buffer pool.
BufferPoolThreadCache
Utilities for managing the calling thread’s local BufferPool caches.
Builder
Assembles IoBufs from a mix of inline writes and zero-copy pieces.
IoBuf
Immutable byte buffer.
IoBufMut
Mutable byte buffer.
IoBufs
Container for one or more immutable buffers.
IoBufsMut
Container for one or more mutable buffers.

Enums§

PoolError
Error returned when buffer pool allocation fails.

Traits§

EncodeExt
Extension trait for encoding values into pooled I/O buffers.