2 unstable releases

0.1.0 Aug 17, 2020
0.0.0 Aug 17, 2020

#93 in #ring-buffer

27 downloads per month

MIT license

6KB
106 lines

bytes-ringbuffer CI Latest Version Badge

Ringbuffer implementing traits from the bytes crate


For now refer to docs.rs for documentation.


lib.rs:

This crate provides a simple ringbuffer that implements the Buf and BufMut traits from the bytes crate.

let mut buf = RingBuffer::new(4);
buf.put_u16(1234);
buf.put_u16(5671);
assert_eq!(buf.get_u16(), 1234);
assert_eq!(buf.get_u16(), 5671);

Dependencies

~215KB