Trait eclectic::PrioDeque
[−]
[src]
pub trait PrioDeque: PrioQueue + Deque { fn push_pop_back(&mut self, item: Self::Item) -> Self::Item where Self: Own { ... } fn replace_back(&mut self, item: Self::Item) -> Option<Self::Item> where Self: Own { ... } }
A double-ended priority queue.
Provided Methods
fn push_pop_back(&mut self, item: Self::Item) -> Self::Item where Self: Own
Pushes the given item onto the deque, then removes the item at the back of the deque and returns it.
fn replace_back(&mut self, item: Self::Item) -> Option<Self::Item> where Self: Own
Removes the item at the back of the deque, then pushes the given item onto the deque.
Returns the item that was removed, or None
if the deque was empty.