Trait eclectic::PrioQueue [] [src]

pub trait PrioQueue: Queue {
    fn push_pop_front(&mut self, item: Self::Item) -> Self::Item where Self: Own { ... }
    fn replace_front(&mut self, item: Self::Item) -> Option<Self::Item> where Self: Own { ... }
}

A priority queue.

Provided Methods

fn push_pop_front(&mut self, item: Self::Item) -> Self::Item where Self: Own

Pushes the given item onto the queue, then removes the item at the front of the queue and returns it.

fn replace_front(&mut self, item: Self::Item) -> Option<Self::Item> where Self: Own

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.

Implementors