Skip to main content

Module buffer

Module buffer 

Source
Expand description

Fixed-capacity stack buffer for hot-path allocations.

PoolBuffer<CAP> is an on-stack array-based buffer with fixed capacity CAP. Append operations are O(1) without touching the heap; overflow is signalled as PoolBufferError::Overflow instead of panicking. no_std-capable.

§Spec relation

This module is not an OMG spec mapping — it is an internal performance primitive for the hot path Writer::write/Reader::take, which is meant to work without a per-sample realloc.

Structs§

PoolBuffer
Fixed-capacity byte buffer that can be filled like Vec<u8> — but does not do a heap realloc. Overflow is reported via Result, not via panic!.

Enums§

PoolBufferError
Error family for PoolBuffer.