pub struct FixedHeapBuf<T> { /* private fields */ }
Expand description

A Ring Buffer which stores all items on the heap.

The FixedHeapBuf will allocate its capacity ahead of time. This is good fit when you have a constant latency between two components.

Trait Implementations

Formats the value using the given formatter. Read more

The type of stored items inside the Ring Buffer

Creates a new instance of the Ring Buffer

Creates a new instance of the Ring Buffer with the given capacity. RingBuf implementations are allowed to ignore the capacity hint and utilize their default capacity. Read more

The capacity of the buffer

The amount of stored items in the buffer

Returns true if there is enough space in the buffer to store another item. Read more

Stores the item at the end of the buffer. Panics if there is not enough free space. Read more

Returns the oldest item inside the buffer. Panics if there is no available item. Read more

Returns true if no item is stored inside the buffer.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.