Trait Queue

Source
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§

Source

fn poll(&self) -> Option<T>

Retrieves and removes the head of this queue or returns None if the queue is empty.

Source

fn is_empty(&self) -> bool

Returns true if the underlying data structure does not contain any elements.

Source

fn offer(&self, e: T) -> Result<(), T>

Implementors§

Source§

impl<T: Send> Queue<T> for LinkedQueue<T>

Source§

impl<T: Delayed + Send> Queue<T> for DelayQueue<T>