PrioDeque

Trait PrioDeque 

Source
pub trait PrioDeque: PrioQueue + Deque {
    // Provided methods
    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 { ... }
}
Expand description

A double-ended priority queue.

Provided Methods§

Source

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.

This method may be deprecated in favor of back_mut in the future.

Source

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.

This method may be deprecated in favor of back_mut in the future.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§