Struct ringtail::buffers::unbounded::UnboundedBuffer[][src]

pub struct UnboundedBuffer<T> { /* fields omitted */ }

Growable ring buffer.

Optimized for repeated appending of bytes to the end and removing bytes from the front of the buffer.

Methods

impl<T: Copy> UnboundedBuffer<T>
[src]

DEFAULT_CAPACITY: usize = 4096

Create a new unbounded buffer with the default capacity.

Create a new unbounded buffer with a given minimum capacity pre-allocated.

Trait Implementations

impl<T: Copy> Default for UnboundedBuffer<T>
[src]

Returns the "default value" for a type. Read more

impl<T> Buffer<T> for UnboundedBuffer<T>
[src]

Returns true if the buffer is empty.

Returns the number of elements in the buffer.

Returns the current capacity of the buffer.

Clears all elements from the buffer and resets the length to zero.

impl<T: Copy> ReadableBuffer<T> for UnboundedBuffer<T>
[src]

Copy elements from the front of the buffer into the given slice. Read more

Consume up to count elements from the front of the buffer and discards them. Read more

Pull elements from the front of the buffer into the given location, up to the length of the destination buffer. Read more

impl<T: Copy> WritableBuffer<T> for UnboundedBuffer<T>
[src]

Copy the given elements and insert them into the back of the buffer. Read more

Auto Trait Implementations

impl<T> Send for UnboundedBuffer<T> where
    T: Send

impl<T> Sync for UnboundedBuffer<T> where
    T: Sync