pub trait BidirectedQueue<T>: Default {
// Required methods
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;
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
A queue that supports both popping and pushing at front and back.
Required Methods§
Sourcefn push_front(&mut self, t: T)
fn push_front(&mut self, t: T)
Insert an element at the front of the queue.
Provided Methods§
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.