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

Priority container storing max capacity amount of items. Can be used to find n smallest items within an iterator or a set of items that implement Ord

Implementations

Create a new PrioContainerMin with capacity

Panics

Panics if capacity is zero

Create a new PrioContainerMin with already allocated spaces

Panics

Panics if capacity is zero

Inserts a new Item into the queue.

Returns the amount of items in the container. This value is always smaller or equal to capacity

Returns true if there is no item in the container

Get the prio container’s capacity

Returns the total amount of items pushed into the prio container

Return a sorted vec of the prio container

Trait Implementations

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. 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.