ring-buffer-tools 0.1.0
A fixed-capacity ring buffer that overwrites the oldest item
Install
cargo add ring-buffer-tools --registry rupm
In Ruststudio: Packages, search for ring-buffer-tools, Install.
Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-22.
Versions
- 0.1.0 2026-11-22
README
# ring-buffer-tools
A fixed-capacity ring buffer that overwrites the oldest item
Add it with `rupm add ring-buffer-tools` (or `cargo add ring-buffer-tools --registry rupm`).
```rust
let mut r = ring_buffer_tools::RingBuffer::new(3);
for i in 1..=5 { r.push(i); }
assert_eq!(r.iter().copied().collect::<Vec<_>>(), vec![3, 4, 5]);
```