Struct sync::spsc_queue::ConsumerExperimental [-]  [+] [src]

pub struct Consumer<T> {
    // some fields omitted
}

A safe abstraction for the consumer in a single-producer single-consumer queue.

Methods

impl<T: Send> Consumer<T>

fn pop(&mut self) -> Option<T>

Attempts to pop the value from the head of the queue, returning None if the queue is empty.

fn peek<'a>(&'a mut self) -> Option<&'a mut T>

Attempts to peek at the head of the queue, returning None if the queue is empty.