Struct smallqueue::SmallQueue

source ·
pub struct SmallQueue<T> { /* private fields */ }
Expand description

A FIFO queue which stores its data in-place when containing 0 or 1 elements, but expands to a dynamically sized heap allocation when more elements are inserted, and can free its heap allocation if the size returns later to 1 or 0.

Implementations

New, empty queue.

New queue with a single element.

Insert an element in insertion end.

Remove an element from the removal end.

Whether the queue is empty.

Trait Implementations

Formats the value using the given formatter. Read more

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.