Skip to main content

Sealer

Trait Sealer 

Source
pub trait Sealer<C> {
    type Output;

    // Required method
    fn seal(chain: &mut Vec<C>) -> Option<Self::Output>;
}
Expand description

Forms a batch from a whole chain of updates at once.

Named rather than a bare fn(&mut Vec<C>) -> Option<B> so that implementors can name the batch they produce. There is no receiver: the chain goes in and the batch comes out, leaving nowhere for an update to be retained.

Required Associated Types§

Source

type Output

Output batch type.

Required Methods§

Source

fn seal(chain: &mut Vec<C>) -> Option<Self::Output>

Builds a batch from a chain of updates.

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, of the interval the caller means to describe. Chains must also be sorted and consolidated.

Having the whole chain in hand, an implementor can size itself before it fills.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<C> Sealer<C> for ChunkBatchBuilder<C>
where C: Chunk + Default + 'static, C::Time: Timestamp,

Source§

impl<L, CI> Sealer<CI> for OrdKeyBuilder<L, CI>
where L: for<'a> Layout<KeyContainer: PushInto<CI::Key<'a>>> + Layout<ValContainer: BatchContainer<Owned: Default>> + Layout, CI: BuilderInput<L::KeyContainer, L::ValContainer, Time = Time<L>, Diff = Diff<L>>,

Source§

impl<L, CI> Sealer<CI> for OrdValBuilder<L, CI>
where L: for<'a> Layout<KeyContainer: PushInto<CI::Key<'a>>, ValContainer: PushInto<CI::Val<'a>>>, CI: for<'a> BuilderInput<L::KeyContainer, L::ValContainer, Time = Time<L>, Diff = Diff<L>>,