pub trait Queue {
type Item;
fn push(&mut self, value: Self::Item) -> Result<(), PushError>;
fn pop(&mut self) -> Option<Self::Item>;
fn len(&self) -> usize;
fn is_empty(&self) -> bool { ... }
}
Expand description
Trait implemented by the queues used in the simulation.
Required Associated Types
Required Methods
Removes the next element and returns it, or None
if the Queue
is empty.