Crate st_ring_buffer

Source
Expand description

A ring buffer specialization for strings. The crate provides two versions of the buffer and a StringBuffer trait they both implement. StRingBuffer is a stack allocated version using const generics. HeapStRingBuffer is a heap allocated version.

When full these buffers both operate by overwriting the current head. All operations happen in constant time except where explicitly noted.

Structs§

BufferIterator
An iterator for StringBuffer types.
HeapStRingBuffer
An implementation of StringBuffer that stores its data on the heap.
StRingBuffer
An implementation of StringBuffer using const generics to store its data on the stack.

Enums§

StringBufferError
An error type used for the failable push functions on StringBuffer.

Traits§

StringBuffer
A buffer specializing in holding data for a string. Pushing data to the buffer will not fail nor panic. When full, the end of the data overwrites the start, while keeping the integrity of the underlying utf-8 data.