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);