pub trait Merger: Default {
    type Chunk: Container;
    type Time;

    // Required methods
    fn merge(
        &mut self,
        list1: Vec<Self::Chunk>,
        list2: Vec<Self::Chunk>,
        output: &mut Vec<Self::Chunk>,
        stash: &mut Vec<Self::Chunk>,
    );
    fn extract(
        &mut self,
        merged: Vec<Self::Chunk>,
        upper: AntichainRef<'_, Self::Time>,
        frontier: &mut Antichain<Self::Time>,
        readied: &mut Vec<Self::Chunk>,
        kept: &mut Vec<Self::Chunk>,
        stash: &mut Vec<Self::Chunk>,
    );
    fn account(chunk: &Self::Chunk) -> (usize, usize, usize, usize);
}
Expand description

A trait to describe interesting moments in a merge batcher.

Required Associated Types§

Source

type Chunk: Container

The internal representation of chunks of data.

Source

type Time

The type of time in frontiers to extract updates.

Required Methods§

Source

fn merge( &mut self, list1: Vec<Self::Chunk>, list2: Vec<Self::Chunk>, output: &mut Vec<Self::Chunk>, stash: &mut Vec<Self::Chunk>, )

Merge chains into an output chain.

Source

fn extract( &mut self, merged: Vec<Self::Chunk>, upper: AntichainRef<'_, Self::Time>, frontier: &mut Antichain<Self::Time>, readied: &mut Vec<Self::Chunk>, kept: &mut Vec<Self::Chunk>, stash: &mut Vec<Self::Chunk>, )

Extract ready updates based on the upper frontier.

Source

fn account(chunk: &Self::Chunk) -> (usize, usize, usize, usize)

Account size and allocation changes. Returns a tuple of (records, size, capacity, allocations).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<MC> Merger for FlatcontainerMerger<MC>
where for<'a> MC: MergerChunk + Clone + 'static + ReserveItems<<MC as Region>::ReadItem<'a>> + Push<<MC as Region>::ReadItem<'a>> + Push<(MC::Data<'a>, MC::Time<'a>, &'a MC::DiffOwned)> + Push<(MC::Data<'a>, MC::Time<'a>, MC::Diff<'a>)>, for<'a> MC::Time<'a>: PartialOrder<MC::TimeOwned> + Copy + IntoOwned<'a, Owned = MC::TimeOwned>, for<'a> MC::Diff<'a>: IntoOwned<'a, Owned = MC::DiffOwned>, for<'a> MC::TimeOwned: Ord + PartialOrder + PartialOrder<MC::Time<'a>> + Data, for<'a> MC::DiffOwned: Default + Semigroup + Semigroup<MC::Diff<'a>> + Data,

Source§

impl<MC, CQ> Merger for ContainerMerger<MC, CQ>
where for<'a> MC: MergerChunk + Clone + PushInto<<MC as Container>::Item<'a>> + 'static, for<'a> MC::TimeOwned: Ord + PartialOrder + Data, CQ: ContainerQueue<MC>,