pub trait Batcher {
type Item;
type Time: Timestamp;
// Required methods
fn new(
logger: Option<Logger<DifferentialEvent, WorkerIdentifier>>,
operator_id: usize,
) -> Self;
fn push_batch(&mut self, batch: RefOrMut<'_, Vec<Self::Item>>);
fn seal<B: Builder<Item = Self::Item, Time = Self::Time>>(
&mut self,
upper: Antichain<Self::Time>,
) -> B::Output;
fn frontier(&mut self) -> AntichainRef<'_, Self::Time>;
}Expand description
Functionality for collecting and batching updates.
Required Associated Types§
Required Methods§
Sourcefn new(
logger: Option<Logger<DifferentialEvent, WorkerIdentifier>>,
operator_id: usize,
) -> Self
fn new( logger: Option<Logger<DifferentialEvent, WorkerIdentifier>>, operator_id: usize, ) -> Self
Allocates a new empty batcher.
Sourcefn push_batch(&mut self, batch: RefOrMut<'_, Vec<Self::Item>>)
fn push_batch(&mut self, batch: RefOrMut<'_, Vec<Self::Item>>)
Adds an unordered batch of elements to the batcher.
Sourcefn seal<B: Builder<Item = Self::Item, Time = Self::Time>>(
&mut self,
upper: Antichain<Self::Time>,
) -> B::Output
fn seal<B: Builder<Item = Self::Item, Time = Self::Time>>( &mut self, upper: Antichain<Self::Time>, ) -> B::Output
Returns all updates not greater or equal to an element of upper.
Sourcefn frontier(&mut self) -> AntichainRef<'_, Self::Time>
fn frontier(&mut self) -> AntichainRef<'_, Self::Time>
Returns the lower envelope of contained update times.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".