pub trait Queue<T: Send> {
// Required methods
fn poll(&self) -> Option<T>;
fn is_empty(&self) -> bool;
fn offer(&self, e: T) -> Result<(), T>;
}
Required Methods§
Sourcefn poll(&self) -> Option<T>
fn poll(&self) -> Option<T>
Retrieves and removes the head of this queue or returns None if the queue is empty.
Sourcefn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Returns true if the underlying data structure does not contain any elements.