Trait timely_communication::Pull

source ·
pub trait Pull<T> {
    // Required method
    fn pull(&mut self) -> &mut Option<T>;

    // Provided method
    fn recv(&mut self) -> Option<T> { ... }
}
Expand description

Pulling elements of type T.

Required Methods§

source

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

Pulls an element and provides the opportunity to take ownership.

The puller may mutate the result, in particular take ownership of the data by replacing it with other data or even None. This allows the puller to return resources to the implementor.

If pull returns None this conventionally signals that no more data is available at the moment, and the puller should find something better to do.

Provided Methods§

source

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

Takes an Option<T> and leaves None behind.

Implementations on Foreign Types§

source§

impl<T, P: ?Sized + Pull<T>> Pull<T> for Box<P>

source§

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

Implementors§

source§

impl<T> Pull<T> for timely_communication::allocator::thread::Puller<T>

source§

impl<T, P: Pull<T>> Pull<T> for timely_communication::allocator::counters::Puller<T, P>

source§

impl<T: Data> Pull<Message<T>> for timely_communication::allocator::zero_copy::push_pull::Puller<T>

source§

impl<T: Data> Pull<Message<T>> for PullerInner<T>