Trait timely::Pull []

pub trait Pull<T> {
    fn pull(&mut self) -> &mut Option<T>;

    fn recv(&mut self) -> Option<T> { ... }
}

Pulling elements of type T.

Required Methods

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

Pulls an element and provides the opportunity to take ownership.

The receiver may mutate the result, in particular take ownership of the data by replacing it with other data or even None. If pull returns None this conventially signals that no more data is available at the moment.

Provided Methods

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

Takes an Option<T> and leaves None behind.

Implementors