Ringbuffer
The ringbuffer crate provides safe fixed size circular buffers (ringbuffers) in rust.
Implementations for three kinds of ringbuffers, with a mostly similar API are provided:
type | description |
---|---|
AllocRingBuffer |
Ringbuffer allocated on the heap at runtime. This ringbuffer is still fixed size. This requires the alloc feature. |
GrowableAllocRingBuffer |
Ringbuffer allocated on the heap at runtime. This ringbuffer can grow in size, and is implemented as an alloc::VecDeque internally. This requires the alloc feature. |
ConstGenericRingBuffer |
Ringbuffer which uses const generics to allocate on the stack. |
All of these ringbuffers also implement the RingBuffer trait for their shared API surface.
MSRV: Rust 1.59
Usage
use ;
Features
name | default | description |
---|---|---|
alloc | ✓ | Disable this feature to remove the dependency on alloc. Disabling this feature makes ringbuffer no_std . |
License
Licensed under MIT License