differential_dataflow::trace::implementations

Trait BuilderInput

Source
pub trait BuilderInput<K: BatchContainer, V: BatchContainer>: Container {
    type Key<'a>: Ord;
    type Val<'a>: Ord;
    type Time;
    type Diff;

    // Required methods
    fn into_parts<'a>(
        item: Self::Item<'a>,
    ) -> (Self::Key<'a>, Self::Val<'a>, Self::Time, Self::Diff);
    fn key_eq(this: &Self::Key<'_>, other: K::ReadItem<'_>) -> bool;
    fn val_eq(this: &Self::Val<'_>, other: V::ReadItem<'_>) -> bool;
    fn key_val_upd_counts(chain: &[Self]) -> (usize, usize, usize);
}
Expand description

Behavior to split an update into principal components.

Required Associated Types§

Source

type Key<'a>: Ord

Key portion

Source

type Val<'a>: Ord

Value portion

Source

type Time

Time

Source

type Diff

Diff

Required Methods§

Source

fn into_parts<'a>( item: Self::Item<'a>, ) -> (Self::Key<'a>, Self::Val<'a>, Self::Time, Self::Diff)

Split an item into separate parts.

Source

fn key_eq(this: &Self::Key<'_>, other: K::ReadItem<'_>) -> bool

Test that the key equals a key in the layout’s key container.

Source

fn val_eq(this: &Self::Val<'_>, other: V::ReadItem<'_>) -> bool

Test that the value equals a key in the layout’s value container.

Source

fn key_val_upd_counts(chain: &[Self]) -> (usize, usize, usize)

Count the number of distinct keys, (key, val) pairs, and total updates.

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<K, KBC, V, VBC, T, R> BuilderInput<KBC, VBC> for FlatStack<TupleABCRegion<TupleABRegion<K, V>, T, R>>
where K: Region + Clone + 'static, V: Region + Clone + 'static, T: Region + Clone + 'static, R: Region + Clone + 'static, for<'a> K::ReadItem<'a>: Copy + Ord, for<'a> V::ReadItem<'a>: Copy + Ord, for<'a> T::ReadItem<'a>: Copy + Ord, for<'a> R::ReadItem<'a>: Copy + Ord, KBC: BatchContainer, VBC: BatchContainer, for<'a> KBC::ReadItem<'a>: PartialEq<K::ReadItem<'a>>, for<'a> VBC::ReadItem<'a>: PartialEq<V::ReadItem<'a>>,

Source§

type Key<'a> = <K as Region>::ReadItem<'a>

Source§

type Val<'a> = <V as Region>::ReadItem<'a>

Source§

type Time = <T as Region>::Owned

Source§

type Diff = <R as Region>::Owned

Source§

fn into_parts<'a>( ((key, val), time, diff): Self::Item<'a>, ) -> (Self::Key<'a>, Self::Val<'a>, Self::Time, Self::Diff)

Source§

fn key_eq(this: &Self::Key<'_>, other: KBC::ReadItem<'_>) -> bool

Source§

fn val_eq(this: &Self::Val<'_>, other: VBC::ReadItem<'_>) -> bool

Source§

fn key_val_upd_counts(chain: &[Self]) -> (usize, usize, usize)

Source§

impl<K, KBC, V, VBC, T, R> BuilderInput<KBC, VBC> for Vec<((K, V), T, R)>
where K: Ord + Clone + 'static, KBC: BatchContainer, for<'a> KBC::ReadItem<'a>: PartialEq<&'a K>, V: Ord + Clone + 'static, VBC: BatchContainer, for<'a> VBC::ReadItem<'a>: PartialEq<&'a V>, T: Timestamp + Lattice + Clone + 'static, R: Ord + Semigroup + 'static,

Source§

type Key<'a> = K

Source§

type Val<'a> = V

Source§

type Time = T

Source§

type Diff = R

Source§

fn into_parts<'a>( ((key, val), time, diff): Self::Item<'a>, ) -> (Self::Key<'a>, Self::Val<'a>, Self::Time, Self::Diff)

Source§

fn key_eq(this: &K, other: KBC::ReadItem<'_>) -> bool

Source§

fn val_eq(this: &V, other: VBC::ReadItem<'_>) -> bool

Source§

fn key_val_upd_counts(chain: &[Self]) -> (usize, usize, usize)

Source§

impl<K, V, T, R> BuilderInput<K, V> for TimelyStack<((K::Owned, V::Owned), T, R)>
where K: BatchContainer, for<'a> K::ReadItem<'a>: PartialEq<&'a K::Owned>, K::Owned: Ord + Columnation + Clone + 'static, V: BatchContainer, for<'a> V::ReadItem<'a>: PartialEq<&'a V::Owned>, V::Owned: Ord + Columnation + Clone + 'static, T: Timestamp + Lattice + Columnation + Clone + 'static, R: Ord + Clone + Semigroup + Columnation + 'static,

Source§

type Key<'a> = &'a <K as BatchContainer>::Owned

Source§

type Val<'a> = &'a <V as BatchContainer>::Owned

Source§

type Time = T

Source§

type Diff = R

Source§

fn into_parts<'a>( ((key, val), time, diff): Self::Item<'a>, ) -> (Self::Key<'a>, Self::Val<'a>, Self::Time, Self::Diff)

Source§

fn key_eq(this: &&K::Owned, other: K::ReadItem<'_>) -> bool

Source§

fn val_eq(this: &&V::Owned, other: V::ReadItem<'_>) -> bool

Source§

fn key_val_upd_counts(chain: &[Self]) -> (usize, usize, usize)

Implementors§