#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

#2392 in Data structures

Download history 226/week @ 2024-04-07 118/week @ 2024-04-14 224/week @ 2024-04-21 197/week @ 2024-04-28 212/week @ 2024-05-05 259/week @ 2024-05-12 180/week @ 2024-05-19 137/week @ 2024-05-26 193/week @ 2024-06-02 120/week @ 2024-06-09 71/week @ 2024-06-16 70/week @ 2024-06-23 46/week @ 2024-06-30 200/week @ 2024-07-07 381/week @ 2024-07-14 85/week @ 2024-07-21

718 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