differential_dataflow::trace

Trait 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,
        lower: Antichain<Self::Time>,
        upper: Antichain<Self::Time>,
        since: Antichain<Self::Time>,
    ) -> Self::Output;

    // Provided method
    fn new() -> Self { ... }
}
Expand description

Functionality for building batches from ordered update sequences.

Required Associated Types§

Source

type Input

Input item type.

Source

type Time: Timestamp

Timestamp type.

Source

type Output

Output batch type.

Required Methods§

Source

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.

Source

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.

Source

fn done( self, lower: Antichain<Self::Time>, upper: Antichain<Self::Time>, since: Antichain<Self::Time>, ) -> Self::Output

Completes building and returns the batch.

Provided Methods§

Source

fn new() -> Self

Allocates an empty builder.

Ideally we deprecate this and insist all non-trivial building happens via with_capacity().

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.

Implementors§

Source§

impl<B: Builder> Builder for RcBuilder<B>

Functionality for building batches from ordered update sequences.

Source§

type Input = <B as Builder>::Input

Source§

type Time = <B as Builder>::Time

Source§

type Output = Rc<<B as Builder>::Output>

Source§

impl<L, CI> Builder for OrdKeyBuilder<L, CI>
where L: Layout, CI: for<'a> BuilderInput<L::KeyContainer, L::ValContainer, Time = <L::Target as Update>::Time, Diff = <L::Target as Update>::Diff>, for<'a> L::KeyContainer: PushInto<CI::Key<'a>>, for<'a> <L::TimeContainer as BatchContainer>::ReadItem<'a>: IntoOwned<'a, Owned = <L::Target as Update>::Time>, for<'a> <L::DiffContainer as BatchContainer>::ReadItem<'a>: IntoOwned<'a, Owned = <L::Target as Update>::Diff>,

Source§

impl<L, CI> Builder for OrdValBuilder<L, CI>
where L: Layout, CI: for<'a> BuilderInput<L::KeyContainer, L::ValContainer, Time = <L::Target as Update>::Time, Diff = <L::Target as Update>::Diff>, for<'a> L::KeyContainer: PushInto<CI::Key<'a>>, for<'a> L::ValContainer: PushInto<CI::Val<'a>>, for<'a> <L::TimeContainer as BatchContainer>::ReadItem<'a>: IntoOwned<'a, Owned = <L::Target as Update>::Time>, for<'a> <L::DiffContainer as BatchContainer>::ReadItem<'a>: IntoOwned<'a, Owned = <L::Target as Update>::Diff>,