Skip to main content

SpineBatch

pub trait SpineBatch: Sized {
    type Time: Timestamp + Lattice;
    type Merger: Merger<Self>;

    // Required method
    fn len(&self) -> usize;
}
Expand description

The requirements this spine imposes on the batches its spans carry.

These are opinions of this spine, not properties of batches in general: a batch must support progressive (fuel-limited) merging through a Merger, and must report its size, which drives the spine’s geometric layering and its logging.

Required Associated Types§

Source

type Time: Timestamp + Lattice

The timestamp type of the batch’s updates.

Source

type Merger: Merger<Self>

A type used to progressively merge batches.

Required Methods§

Source

fn len(&self) -> usize

The number of updates in the batch.

A span with nothing in it is meant to carry no batch at all rather than an empty one, so this should be positive. The spine does not rely on that: it asks this method rather than asking whether a span carries a batch, so a producer that hands it an empty batch costs an extra merge rather than behaving differently from the absent case.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<B: SpineBatch> SpineBatch for Rc<B>

Implementors§