#ring-buffer #structure #read #pointers #offers #multiple #store

wheelbuf

The wheelbuffer crate offers a ringbuffer-like structure without a read pointer, making multiple reads of a buffer possible. The store behind the buffer is flexible and can be a static array, a vector or any other structure that can be converted into a slice.

1 unstable release

Uses old Rust 2015

0.2.0 Nov 19, 2016

#2258 in Data structures

Download history 92/week @ 2024-07-22 103/week @ 2024-07-29 67/week @ 2024-08-05 57/week @ 2024-08-12 61/week @ 2024-08-19 65/week @ 2024-08-26 47/week @ 2024-09-02 63/week @ 2024-09-09 72/week @ 2024-09-16 71/week @ 2024-09-23 57/week @ 2024-09-30 34/week @ 2024-10-07 48/week @ 2024-10-14 64/week @ 2024-10-21 54/week @ 2024-10-28 55/week @ 2024-11-04

224 downloads per month
Used in casper-node

MIT license

7KB
170 lines

Multi-read no_std ring buffer

The wheelbuffer crate offers a ringbuffer-like structure without a read pointer, making multiple reads of a buffer possible. The store behind the buffer is flexible and can be a static array, a vector or any other structure that can be converted into a slice.

Documentation is available at docs.rs.


lib.rs:

Multi-read no_std ring buffer

The wheelbuffer crate offers a ringbuffer-like structure without a read pointer, making multiple reads of a buffer possible. Instead of relying on a fixed data structure as a backend, it is generic over a type C that offers the slice interface, e.g. a vector or even a static array.

The create performs no allocations itself and does not use the standard library (#![no_std]).

No runtime deps