Trait differential_dataflow::trace::Merger

source ·
pub trait Merger<Output: Batch> {
    // Required methods
    fn new(
        source1: &Output,
        source2: &Output,
        compaction_frontier: AntichainRef<'_, Output::Time>
    ) -> Self;
    fn work(&mut self, source1: &Output, source2: &Output, fuel: &mut isize);
    fn done(self) -> Output;
}
Expand description

Represents a merge in progress.

Required Methods§

source

fn new( source1: &Output, source2: &Output, compaction_frontier: AntichainRef<'_, Output::Time> ) -> Self

Creates a new merger to merge the supplied batches, optionally compacting up to the supplied frontier.

source

fn work(&mut self, source1: &Output, source2: &Output, fuel: &mut isize)

Perform some amount of work, decrementing fuel.

If fuel is non-zero after the call, the merging is complete and one should call done to extract the merged results.

source

fn done(self) -> Output

Extracts merged results.

This method should only be called after work has been called and has not brought fuel to zero. Otherwise, the merge is still in progress.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<B: Batch + Abomonation> Merger<Abomonated<B, Vec<u8>>> for AbomonatedMerger<B>

Represents a merge in progress.

source§

impl<B: Batch> Merger<Rc<B>> for RcMerger<B>

Represents a merge in progress.