Trait differential_dataflow::trace::BatchReader

source ·
pub trait BatchReader
where Self: Sized,
{ type Key<'a>: Copy + Clone + Ord; type Val<'a>: Copy + Clone; type Time: Timestamp + Lattice + Ord + Clone; type TimeGat<'a>: Copy + IntoOwned<'a, Owned = Self::Time>; type Diff: Semigroup + 'static; type DiffGat<'a>: Copy + IntoOwned<'a, Owned = Self::Diff>; type Cursor: for<'a> Cursor<Storage = Self, Key<'a> = Self::Key<'a>, Val<'a> = Self::Val<'a>, Time = Self::Time, TimeGat<'a> = Self::TimeGat<'a>, Diff = Self::Diff, DiffGat<'a> = Self::DiffGat<'a>>; // 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 + Ord

Key by which updates are indexed.

source

type Val<'a>: Copy + Clone

Values associated with keys.

source

type Time: Timestamp + Lattice + Ord + Clone

Timestamps associated with updates

source

type TimeGat<'a>: Copy + IntoOwned<'a, Owned = Self::Time>

Borrowed form of timestamp.

source

type Diff: Semigroup + 'static

Owned form of update difference.

source

type DiffGat<'a>: Copy + IntoOwned<'a, Owned = Self::Diff>

Borrowed form of update difference.

source

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

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 Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

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

§

type Diff = <B as BatchReader>::Diff

§

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

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 Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

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

§

type Diff = <B as BatchReader>::Diff

§

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

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 Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

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

§

type Diff = <B as BatchReader>::Diff

§

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

§

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

source§

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

§

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

§

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

§

type Time = <B as BatchReader>::Time

§

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

§

type Diff = <B as BatchReader>::Diff

§

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

§

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 Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = TInner

§

type TimeGat<'a> = &'a TInner

§

type Diff = <B as BatchReader>::Diff

§

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

§

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::TimeGat<'_>) -> TInner + Clone,

§

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

§

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

§

type Time = TInner

§

type TimeGat<'a> = &'a TInner

§

type Diff = <B as BatchReader>::Diff

§

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

§

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 Val<'a> = <B as BatchReader>::Val<'a>

§

type Time = <B as BatchReader>::Time

§

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

§

type Diff = <B as BatchReader>::Diff

§

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

§

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 Val<'a> = &'a ()

§

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

§

type TimeGat<'a> = <<L as Layout>::TimeContainer as BatchContainer>::ReadItem<'a>

§

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

§

type DiffGat<'a> = <<L as Layout>::DiffContainer as BatchContainer>::ReadItem<'a>

§

type Cursor = OrdKeyCursor<L>

source§

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

§

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

§

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

§

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

§

type TimeGat<'a> = <<L as Layout>::TimeContainer as BatchContainer>::ReadItem<'a>

§

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

§

type DiffGat<'a> = <<L as Layout>::DiffContainer as BatchContainer>::ReadItem<'a>

§

type Cursor = OrdValCursor<L>