Struct dvcompute::simulation::queue::Queue[][src]

pub struct Queue<SI, SM, SO, T> where
    SI: QueueStrategy,
    SM: QueueStrategy,
    SO: QueueStrategy
{ /* fields omitted */ }
Expand description

Represents an optimized bounded queue by using the specified strategies for enqueueing (input), SI, internal storing (in memory), SM, and dequeueing (output), SO, where T denotes the type of items stored in the queue.

Implementations

Create a new bounded queue by the specified strategies and capacity.

Return the queue capacity, i.e. its maximum size.

Test whether the queue is empty.

Test whether the queue is full.

Return the current queue size.

Return the load factor: the queue size divided by its capacity, i.e. maximum size.

Dequeue by suspending the process if the queue is empty.

Dequeue with output prioerity by suspending the process if the queue is empty.

Try to dequeue immediately.

Remove the item from the queue and return a flag indicating whether the item was found and actually removed.

Remove the specified item from the queue.

Remove an item satisfying the specified predicate and return the item if found.

Test whether there is an item satisfying the specified predicate.

Find an item satisfying the specified predicate.

Clear the queue.

Enqueue the item by suspending the process if the queue is full.

Enqueue the item with input priority by suspending the process if the queue is full.

Enqueue the item with storing priority by suspending the process if the queue is full.

Enqueue the item with input and storing priorities by suspending the process if the queue is full.

Try to enqueue the item. Return false within Event computation if the queue is full.

Try to enqueue the item with storing priority. Return false within Event computation if the queue is full.

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

Performs the conversion.

Performs the conversion.

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.