Trait ringtail::buffers::Buffer [−][src]
pub trait Buffer<T> { fn len(&self) -> usize; fn capacity(&self) -> usize; fn clear(&mut self); fn is_empty(&self) -> bool { ... } }
Base trait that all buffers implement.
Required Methods
fn len(&self) -> usize
Returns the number of elements in the buffer.
fn capacity(&self) -> usize
Returns the current capacity of the buffer.
fn clear(&mut self)
Clears all elements from the buffer and resets the length to zero.
Provided Methods
Implementors
impl<T> Buffer<T> for Reader<T>
impl<T> Buffer<T> for Writer<T>
impl<T> Buffer<T> for UnboundedBuffer<T>