2 unstable releases

0.1.0 Aug 17, 2020
0.0.0 Aug 17, 2020

#111 in #ring-buffer

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

~225KB