pub trait Merger<Output: SpineBatch> {
// 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) -> Option<Output>;
}Expand description
Represents a merge in progress.
Constructing a merger begins the merge of two consecutive batches. Exercising it eventually produces the same result that merging them outright would, but does so in a measured fashion, which avoids latency spikes when a large merge needs to happen.
Required Methods§
Sourcefn new(
source1: &Output,
source2: &Output,
compaction_frontier: AntichainRef<'_, Output::Time>,
) -> Self
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".