Struct dvcompute::simulation::queue::unbounded::Queue [−][src]
pub struct Queue<SM, SO, T> where
SM: QueueStrategy,
SO: QueueStrategy, { /* fields omitted */ }
Expand description
Represents an optimized unbounded queue by using the specified strategies for internal storing (in memory), SM
,
and dequeueing (output), SO
, where T
denotes the type of items stored in the queue.
Implementations
impl<SM, SO, T> Queue<SM, SO, T> where
SM: QueueStrategy + 'static,
SO: QueueStrategy + 'static,
T: Clone + 'static,
impl<SM, SO, T> Queue<SM, SO, T> where
SM: QueueStrategy + 'static,
SO: QueueStrategy + 'static,
T: Clone + 'static,
Create a new unbounded queue by the specified strategies.
Test whether the queue is empty.
Return the current queue 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.