Struct deadqueue::unlimited::Queue

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

Queue that is unlimited in size.

This queue implementation has the following characteristics:

  • Based on crossbeam_queue::SegQueue
  • Has unlimitied capacity and no back pressure on push
  • Enabled via the unlimited feature in your Cargo.toml

Implementations

Create new empty queue

Get an item from the queue. If the queue is currently empty this method blocks until an item is available.

Try to get an item from the queue. If the queue is currently empty return None instead.

Push an item into the queue

Get current length of queue (number of items currently stored).

Returns true if the queue is empty.

Get available count. This is the difference between the current queue length and the number of tasks waiting for an item of the queue.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Creates a value from an iterator. 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.