BatchReader

Trait BatchReader 

Source
pub trait BatchReader: LayoutExt + Sized {
    type Cursor: Cursor<Storage = Self> + WithLayout<Layout = Self::Layout> + for<'a> LayoutExt<Key<'a> = Self::Key<'a>, KeyOwn = Self::KeyOwn, Val<'a> = Self::Val<'a>, ValOwn = Self::ValOwn, Time = Self::Time, TimeGat<'a> = Self::TimeGat<'a>, Diff = Self::Diff, DiffGat<'a> = Self::DiffGat<'a>, KeyContainer = Self::KeyContainer, ValContainer = Self::ValContainer, TimeContainer = Self::TimeContainer, DiffContainer = Self::DiffContainer>;

    // 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 Cursor: Cursor<Storage = Self> + WithLayout<Layout = Self::Layout> + for<'a> LayoutExt<Key<'a> = Self::Key<'a>, KeyOwn = Self::KeyOwn, Val<'a> = Self::Val<'a>, ValOwn = Self::ValOwn, Time = Self::Time, TimeGat<'a> = Self::TimeGat<'a>, Diff = Self::Diff, DiffGat<'a> = Self::DiffGat<'a>, KeyContainer = Self::KeyContainer, ValContainer = Self::ValContainer, TimeContainer = Self::TimeContainer, DiffContainer = Self::DiffContainer>

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> 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.

Implementors§

Source§

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

Source§

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

Source§

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

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

Source§

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

Source§

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

Source§

impl<L: for<'a> Layout<ValContainer: BatchContainer<ReadItem<'a> = &'a ()>>> BatchReader for OrdKeyBatch<L>