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§
- Buffer
Iterator - An iterator for StringBuffer types.
- Heap
StRing Buffer - An implementation of
StringBuffer
that stores its data on the heap. - StRing
Buffer - An implementation of
StringBuffer
using const generics to store its data on the stack.
Enums§
- String
Buffer Error - An error type used for the failable push functions on StringBuffer.
Traits§
- String
Buffer - 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.