Trait differential_dataflow::trace::BatchReader

source ·
pub trait BatchReader
where Self: Sized,
{ type Key<'a>: Copy + Clone + MyTrait<'a, Owned = Self::KeyOwned>; type KeyOwned: Ord + Clone; type Val<'a>: Copy + Clone + MyTrait<'a>; type Time: Timestamp + Lattice + Ord + Clone; type Diff: Semigroup; type Cursor: for<'a> Cursor<Storage = Self, Key<'a> = Self::Key<'a>, KeyOwned = Self::KeyOwned, Val<'a> = Self::Val<'a>, Time = Self::Time, Diff = Self::Diff>; // Required methods fn cursor(&self) -> Self::Cursor; fn len(&self) -> usize; fn description(&self) -> &Description<Self::Time>; // Provided methods fn is_empty(&self) -> bool { ... } fn lower(&self) -> &Antichain<Self::Time> { ... } fn upper(&self) -> &Antichain<Self::Time> { ... } }
Expand description

A batch of updates whose contents may be read.

This is a restricted interface to batches of updates, which support the reading of the batch’s contents, but do not expose ways to construct the batches. This trait is appropriate for views of the batch, and is especially useful for views derived from other sources in ways that prevent the construction of batches from the type of data in the view (for example, filtered views, or views with extended time coordinates).

Required Associated Types§

source

type Key<'a>: Copy + Clone + MyTrait<'a, Owned = Self::KeyOwned>

Key by which updates are indexed.

source

type KeyOwned: Ord + Clone

Owned version of the above.

source

type Val<'a>: Copy + Clone + MyTrait<'a>

Values associated with keys.

source

type Time: Timestamp + Lattice + Ord + Clone

Timestamps associated with updates

source

type Diff: Semigroup

Associated update.

source

type Cursor: for<'a> Cursor<Storage = Self, Key<'a> = Self::Key<'a>, KeyOwned = Self::KeyOwned, Val<'a> = Self::Val<'a>, Time = Self::Time, Diff = Self::Diff>

The type used to enumerate the batch’s contents.

Required Methods§

source

fn cursor(&self) -> Self::Cursor

Acquires a cursor to the batch’s contents.

source

fn len(&self) -> usize

The number of updates in the batch.

source

fn description(&self) -> &Description<Self::Time>

Describes the times of the updates in the batch.

Provided Methods§

source

fn is_empty(&self) -> bool

True if the batch is empty.

source

fn lower(&self) -> &Antichain<Self::Time>

All times in the batch are greater or equal to an element of lower.

source

fn upper(&self) -> &Antichain<Self::Time>

All times in the batch are not greater or equal to any element of upper.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<B: BatchReader + Abomonation> BatchReader for Abomonated<B, Vec<u8>>

§

type Cursor = AbomonatedBatchCursor<<B as BatchReader>::Cursor>

The type used to enumerate the batch’s contents.

source§

fn cursor(&self) -> Self::Cursor

Acquires a cursor to the batch’s contents.

source§

fn len(&self) -> usize

The number of updates in the batch.

source§

fn description(&self) -> &Description<Self::Time>

Describes the times of the updates in the batch.

§

type Key<'a> = <B as BatchReader>::Key<'a>

§

type KeyOwned = <B as BatchReader>::KeyOwned

§

type Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

type Diff = <B as BatchReader>::Diff

source§

impl<B: BatchReader> BatchReader for Rc<B>

§

type Cursor = RcBatchCursor<<B as BatchReader>::Cursor>

The type used to enumerate the batch’s contents.

source§

fn cursor(&self) -> Self::Cursor

Acquires a cursor to the batch’s contents.

source§

fn len(&self) -> usize

The number of updates in the batch.

source§

fn description(&self) -> &Description<Self::Time>

Describes the times of the updates in the batch.

§

type Key<'a> = <B as BatchReader>::Key<'a>

§

type KeyOwned = <B as BatchReader>::KeyOwned

§

type Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

type Diff = <B as BatchReader>::Diff

Implementors§

source§

impl<B, F> BatchReader for BatchFilter<B, F>
where B: BatchReader, F: FnMut(B::Key<'_>, B::Val<'_>) -> bool + Clone + 'static,

§

type Key<'a> = <B as BatchReader>::Key<'a>

§

type KeyOwned = <B as BatchReader>::KeyOwned

§

type Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

type Diff = <B as BatchReader>::Diff

§

type Cursor = BatchCursorFilter<<B as BatchReader>::Cursor, F>

source§

impl<B, F> BatchReader for BatchFreeze<B, F>
where B: BatchReader, F: Fn(&B::Time) -> Option<B::Time>,

§

type Key<'a> = <B as BatchReader>::Key<'a>

§

type KeyOwned = <B as BatchReader>::KeyOwned

§

type Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

type Diff = <B as BatchReader>::Diff

§

type Cursor = BatchCursorFreeze<<B as BatchReader>::Cursor, F>

source§

impl<B, TInner> BatchReader for differential_dataflow::trace::wrappers::enter::BatchEnter<B, TInner>
where B: BatchReader, TInner: Refines<B::Time> + Lattice,

§

type Key<'a> = <B as BatchReader>::Key<'a>

§

type KeyOwned = <B as BatchReader>::KeyOwned

§

type Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = TInner

§

type Diff = <B as BatchReader>::Diff

§

type Cursor = BatchCursorEnter<<B as BatchReader>::Cursor, TInner>

source§

impl<B, TInner, F> BatchReader for differential_dataflow::trace::wrappers::enter_at::BatchEnter<B, TInner, F>
where B: BatchReader, TInner: Refines<B::Time> + Lattice, F: FnMut(B::Key<'_>, <B::Cursor as Cursor>::Val<'_>, &B::Time) -> TInner + Clone,

§

type Key<'a> = <B as BatchReader>::Key<'a>

§

type KeyOwned = <B as BatchReader>::KeyOwned

§

type Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = TInner

§

type Diff = <B as BatchReader>::Diff

§

type Cursor = BatchCursorEnter<<B as BatchReader>::Cursor, TInner, F>

source§

impl<B: BatchReader> BatchReader for BatchFrontier<B>

§

type Key<'a> = <B as BatchReader>::Key<'a>

§

type KeyOwned = <B as BatchReader>::KeyOwned

§

type Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

type Diff = <B as BatchReader>::Diff

§

type Cursor = BatchCursorFrontier<<B as BatchReader>::Cursor>

source§

impl<L: Layout> BatchReader for OrdKeyBatch<L>

§

type Key<'a> = <<L as Layout>::KeyContainer as BatchContainer>::ReadItem<'a>

§

type KeyOwned = <<L as Layout>::Target as Update>::Key

§

type Val<'a> = &'a ()

§

type Time = <<L as Layout>::Target as Update>::Time

§

type Diff = <<L as Layout>::Target as Update>::Diff

§

type Cursor = OrdKeyCursor<L>

source§

impl<L: Layout> BatchReader for OrdValBatch<L>

§

type Key<'a> = <<L as Layout>::KeyContainer as BatchContainer>::ReadItem<'a>

§

type KeyOwned = <<L as Layout>::Target as Update>::Key

§

type Val<'a> = <<L as Layout>::ValContainer as BatchContainer>::ReadItem<'a>

§

type Time = <<L as Layout>::Target as Update>::Time

§

type Diff = <<L as Layout>::Target as Update>::Diff

§

type Cursor = OrdValCursor<L>