pub trait Buffer {
type Item;
// Required methods
fn push(&mut self, item: Self::Item) -> Result<(), ()>;
fn pop(&mut self) -> Option<Self::Item>;
}
Expand description
A trait representing a buffer which may or may not support to replace items when the buffer is full.