#buffer #ring-buffer #read #structure #pointers #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 105/week @ 2023-12-01 104/week @ 2023-12-08 61/week @ 2023-12-15 56/week @ 2023-12-22 76/week @ 2023-12-29 135/week @ 2024-01-05 67/week @ 2024-01-12 88/week @ 2024-01-19 68/week @ 2024-01-26 91/week @ 2024-02-02 195/week @ 2024-02-09 167/week @ 2024-02-16 186/week @ 2024-02-23 146/week @ 2024-03-01 218/week @ 2024-03-08 176/week @ 2024-03-15

763 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