pub trait Consumer<T> {
    fn pop(&self) -> Result<T, PopError>;
    fn try_pop(&self) -> Result<T, TryPopError>;
}
Expand description

The consumer end of the queue allows for receiving data. Consumer<T> is always Send, but is only Sync for multi-consumer (SPMC, MPMC) queues.

Required Methods

Remove value from the end of the queue. This method will block if the queue is currently empty.

Attempt to remove a value from the end of the queue. If the value was removed successfully, Some(T) will be returned. If unsuccessful, None will be returned. An unsuccessful pop indicates that the queue was empty.

Implementors