Trait rb::RbInspector [] [src]

pub trait RbInspector {
    fn is_empty(&self) -> bool;
    fn is_full(&self) -> bool;
    fn capacity(&self) -> usize;
    fn slots_free(&self) -> usize;
    fn count(&self) -> usize;
}

RbInspector provides non-modifying operations on the ring buffer.

Required Methods

fn is_empty(&self) -> bool

Returns true if the buffer is empty.

fn is_full(&self) -> bool

Returns true if the buffer is full.

fn capacity(&self) -> usize

Returns the total capacity of the ring buffer. This is the size with which the buffer was initialized.

fn slots_free(&self) -> usize

Returns the number of values that can be written until the buffer until it is full.

fn count(&self) -> usize

Returns the number of values from the buffer that are available to read.

Implementors