Trait eclectic::PrioDeque [] [src]

pub trait PrioDeque: PrioQueue + Deque {
    fn push_pop_back(&mut self, item: Self::Item) -> Self::Item where Self: AddRemove { ... }
    fn replace_back(&mut self, item: Self::Item) -> Option<Self::Item> where Self: AddRemove { ... }
}

A double-ended priority queue.

Provided Methods

fn push_pop_back(&mut self, item: Self::Item) -> Self::Item where Self: AddRemove

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: AddRemove

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.

Implementors