Struct simrs::Fifo

source · []
pub struct Fifo<T> { /* private fields */ }
Expand description

Abstraction over VecDeque that allows to limit the capacity of the queue. This means that push operations can fail. By default, the capacity is equal to usize::MAX, which makes unlimited in practice.

Implementations

Creates a new queue with limited capacity.

Trait Implementations

Returns the “default value” for a type. Read more

Type of elements held by the queue.

Add an element to the queue. Read more

Removes the next element and returns it, or None if the Queue is empty.

Returns the number of elements in the queue.

Returns true if there are no elements in the queue.

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.