Trait timely::communication::Push

source ·
pub trait Push<T> {
    // Required method
    fn push(&mut self, element: &mut Option<T>);

    // Provided methods
    fn send(&mut self, element: T) { ... }
    fn done(&mut self) { ... }
}
Expand description

Pushing elements of type T.

This trait moves data around using references rather than ownership, which provides the opportunity for zero-copy operation. In the call to push(element) the implementor can swap some other value to replace element, effectively returning the value to the caller.

Conventionally, a sequence of calls to push() should conclude with a call of push(&mut None) or done() to signal to implementors that another call to push() may not be coming.

Required Methods§

source

fn push(&mut self, element: &mut Option<T>)

Pushes element with the opportunity to take ownership.

Provided Methods§

source

fn send(&mut self, element: T)

Pushes element and drops any resulting resources.

source

fn done(&mut self)

Pushes None, conventionally signalling a flush.

Implementations on Foreign Types§

source§

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

source§

fn push(&mut self, element: &mut Option<T>)

Implementors§

source§

impl<T> Push<T> for timely::communication::allocator::thread::Pusher<T>

source§

impl<T, C: Container, P: Push<Message<T, C>>> Push<Message<T, C>> for LogPusher<T, C, P>

source§

impl<T, P> Push<T> for ArcPusher<T, P>
where P: Push<T>,

source§

impl<T, P> Push<T> for timely::communication::allocator::counters::Pusher<T, P>
where P: Push<T>,

source§

impl<T, P> Push<T> for timely::communication::allocator::zero_copy::push_pull::Pusher<T, P>
where T: Bytesable, P: BytesPush,

source§

impl<T: Timestamp, C: Container, P> Push<Message<T, C>> for Counter<T, C, P>
where P: Push<Message<T, C>>,

source§

impl<T: Data, C: Container + Data> Push<Message<T, C>> for Tee<T, C>

source§

impl<T: Eq + Data, CB, P, H> Push<Message<T, <CB as ContainerBuilder>::Container>> for Exchange<T, CB, P, H>
where CB: ContainerBuilder + for<'a> PushInto<<CB::Container as Container>::Item<'a>>, CB::Container: SizableContainer, P: Push<Message<T, CB::Container>>, for<'a> H: FnMut(&<CB::Container as Container>::Item<'a>) -> u64,