pub trait Merger: Default {
type Chunk: Default;
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 len(chunk: &Self::Chunk) -> usize;
// Provided method
fn allocation(_chunk: &Self::Chunk) -> (usize, usize, usize) { ... }
}Expand description
A trait to describe interesting moments in a merge batcher.
Required Associated Types§
Required Methods§
Sourcefn merge(
&mut self,
list1: Vec<Self::Chunk>,
list2: Vec<Self::Chunk>,
output: &mut Vec<Self::Chunk>,
stash: &mut Vec<Self::Chunk>,
)
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.
Provided Methods§
Sourcefn allocation(_chunk: &Self::Chunk) -> (usize, usize, usize)
fn allocation(_chunk: &Self::Chunk) -> (usize, usize, usize)
Backing-allocation figures for a chunk: (size, capacity, allocations), for
the size logger’s memory telemetry.
Defaults to zero — most chunk types do not track this. Override to report real figures (e.g. Materialize’s memory accounting).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".