Struct timely::dataflow::channels::pushers::counter::Counter [] [src]

pub struct Counter<T, D, P: Push<(T, Content<D>)>> {
    // some fields omitted
}

A wrapper which updates shared counts based on the number of records pushed.

Methods

impl<T, D, P: Push<(T, Content<D>)>> Counter<T, D, P> where T: Eq + Clone + 'static
[src]

fn new(pushee: P, counts: Rc<RefCell<CountMap<T>>>) -> Counter<T, D, P>

Allocates a new Counter from a pushee and shared counts.

fn pull_progress(&mut self, updates: &mut CountMap<T>)

Extracts shared counts into updates.

It is unclear why this method exists at the same time the counts are shared. Perhaps this should be investigated, and only one pattern used. Seriously.

Trait Implementations

impl<T, D, P: Push<(T, Content<D>)>> Push<(T, Content<D>)> for Counter<T, D, P> where T: Eq + Clone + 'static
[src]

fn push(&mut self, message: &mut Option<(T, Content<D>)>)

Pushes element and provides the opportunity to take ownership. Read more

fn send(&mut self, element: T)

Pushes element and drops any resulting resources.

fn done(&mut self)

Pushes None, conventionally signalling a flush.