Trait 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, Owned = Self::ValOwned>; type ValOwned: Ord + Clone; type Time: Timestamp; type Diff; type Cursor: for<'a> Cursor<Storage = Self, Key<'a> = Self::Key<'a>, KeyOwned = Self::KeyOwned, Val<'a> = Self::Val<'a>, ValOwned = Self::ValOwned, 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, Owned = Self::ValOwned>

Values associated with keys.

Source

type ValOwned: Ord + Clone

Owned version of the above.

Source

type Time: Timestamp

Timestamps associated with updates

Source

type Diff

Associated update.

Source

type Cursor: for<'a> Cursor<Storage = Self, Key<'a> = Self::Key<'a>, KeyOwned = Self::KeyOwned, Val<'a> = Self::Val<'a>, ValOwned = Self::ValOwned, 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.

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.

Implementations on Foreign Types§

Source§

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

Source§

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.

Source§

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

Source§

type KeyOwned = <B as BatchReader>::KeyOwned

Source§

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

Source§

type ValOwned = <B as BatchReader>::ValOwned

Source§

type Time = <B as BatchReader>::Time

Source§

type Diff = <B as BatchReader>::Diff

Source§

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

Source§

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.

Source§

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

Source§

type KeyOwned = <B as BatchReader>::KeyOwned

Source§

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

Source§

type ValOwned = <B as BatchReader>::ValOwned

Source§

type Time = <B as BatchReader>::Time

Source§

type Diff = <B as BatchReader>::Diff

Implementors§

Source§

impl<B> BatchReader for BatchFrontier<B>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

type KeyOwned = <B as BatchReader>::KeyOwned

Source§

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

Source§

type ValOwned = <B as BatchReader>::ValOwned

Source§

type Time = TInner

Source§

type Diff = <B as BatchReader>::Diff

Source§

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, B::Time: Timestamp, TInner: Refines<B::Time> + Lattice, F: FnMut(B::Key<'_>, <B::Cursor as Cursor>::Val<'_>, &B::Time) -> TInner + Clone,

Source§

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

Source§

type KeyOwned = <B as BatchReader>::KeyOwned

Source§

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

Source§

type ValOwned = <B as BatchReader>::ValOwned

Source§

type Time = TInner

Source§

type Diff = <B as BatchReader>::Diff

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

type ValOwned = ()

Source§

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

Source§

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

Source§

type Cursor = OrdKeyCursor<L>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

type ValOwned = <<L as Layout>::Target as Update>::Val

Source§

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

Source§

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

Source§

type Cursor = OrdValCursor<L>