Trait eclectic::PrioQueue
[−]
[src]
pub trait PrioQueue: Queue { fn push_pop_front(&mut self, item: Self::Item) -> Self::Item where Self: AddRemove { ... } fn replace_front(&mut self, item: Self::Item) -> Option<Self::Item> where Self: AddRemove { ... } }
A priority queue.
Provided Methods
fn push_pop_front(&mut self, item: Self::Item) -> Self::Item where Self: AddRemove
Pushes the given item onto the queue, then removes the item at the front of the queue and returns it.
This method may be deprecated in favor of front_mut
in the future.
fn replace_front(&mut self, item: Self::Item) -> Option<Self::Item> where Self: AddRemove
Removes the item at the front of the queue, then pushes the given item onto the queue.
Returns the item that was removed, or None
if the queue was empty.
This method may be deprecated in favor of front_mut
in the future.
Implementors
impl<T: Ord> PrioQueue for BinaryHeap<T>