Trait differential_dataflow::trace::Builder
source · pub trait Builder: Sized {
type Input;
type Time: Timestamp;
type Output;
// Required methods
fn with_capacity(keys: usize, vals: usize, upds: usize) -> Self;
fn push(&mut self, chunk: &mut Self::Input);
fn done(self, description: Description<Self::Time>) -> Self::Output;
fn seal(
chain: &mut Vec<Self::Input>,
description: Description<Self::Time>,
) -> Self::Output;
// Provided method
fn new() -> Self { ... }
}
Expand description
Functionality for building batches from ordered update sequences.
Required Associated Types§
Required Methods§
sourcefn with_capacity(keys: usize, vals: usize, upds: usize) -> Self
fn with_capacity(keys: usize, vals: usize, upds: usize) -> Self
Allocates an empty builder with capacity for the specified keys, values, and updates.
They represent respectively the number of distinct key
, (key, val)
, and total updates.
sourcefn push(&mut self, chunk: &mut Self::Input)
fn push(&mut self, chunk: &mut Self::Input)
Adds a chunk of elements to the batch.
Adds all elements from chunk
to the builder and leaves chunk
in an undefined state.
sourcefn done(self, description: Description<Self::Time>) -> Self::Output
fn done(self, description: Description<Self::Time>) -> Self::Output
Completes building and returns the batch.
sourcefn seal(
chain: &mut Vec<Self::Input>,
description: Description<Self::Time>,
) -> Self::Output
fn seal( chain: &mut Vec<Self::Input>, description: Description<Self::Time>, ) -> Self::Output
Builds a batch from a chain of updates corresponding to the indicated lower and upper bounds.
This method relies on the chain only containing updates greater or equal to the lower frontier, and not greater or equal to the upper frontier, as encoded in the description. Chains must also be sorted and consolidated.
Provided Methods§
Object Safety§
Implementors§
source§impl<B: Builder> Builder for RcBuilder<B>
impl<B: Builder> Builder for RcBuilder<B>
Functionality for building batches from ordered update sequences.