pub trait MergerChunk: SizableContainer {
type TimeOwned;
type DiffOwned: Default;
// Required methods
fn time_kept(
time1: &Self::Item<'_>,
upper: &AntichainRef<'_, Self::TimeOwned>,
frontier: &mut Antichain<Self::TimeOwned>,
) -> bool;
fn push_and_add<'a>(
&mut self,
item1: Self::Item<'a>,
item2: Self::Item<'a>,
stash: &mut Self::DiffOwned,
);
// Provided method
fn account(&self) -> (usize, usize, usize, usize) { ... }
}
Expand description
Behavior to dissect items of chunks in the merge batcher
Required Associated Types§
Required Methods§
Sourcefn time_kept(
time1: &Self::Item<'_>,
upper: &AntichainRef<'_, Self::TimeOwned>,
frontier: &mut Antichain<Self::TimeOwned>,
) -> bool
fn time_kept( time1: &Self::Item<'_>, upper: &AntichainRef<'_, Self::TimeOwned>, frontier: &mut Antichain<Self::TimeOwned>, ) -> bool
Relates a borrowed time to antichains of owned times.
If upper
is less or equal to time
, the method returns true
and ensures that frontier
reflects time
.
Sourcefn push_and_add<'a>(
&mut self,
item1: Self::Item<'a>,
item2: Self::Item<'a>,
stash: &mut Self::DiffOwned,
)
fn push_and_add<'a>( &mut self, item1: Self::Item<'a>, item2: Self::Item<'a>, stash: &mut Self::DiffOwned, )
Push an entry that adds together two diffs.
This is only called when two items are deemed mergeable by the container queue. If the two diffs added together is zero do not push anything.
Provided Methods§
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.