Trait traitgraph::algo::queue::BidirectedQueue[][src]

pub trait BidirectedQueue<T>: Default {
    fn push_front(&mut self, t: T);
fn push_back(&mut self, t: T);
fn pop_front(&mut self) -> Option<T>;
fn pop_back(&mut self) -> Option<T>;
fn clear(&mut self);
fn len(&self) -> usize; fn is_empty(&self) -> bool { ... } }
Expand description

A queue that supports both popping and pushing at front and back.

Required methods

Insert an element at the front of the queue.

Insert an element at the back of the queue.

Remove and return an element from the front of the queue.

Remove and return an element from the back of the queue.

Remove all elements from the queue without returning them.

Return the amount of elements currently in the queue.

Provided methods

Returns true if the queue contains no elements.

Implementations on Foreign Types

Implementors