Type Alias RowValue

Source
pub type RowValue<C> = DomPair<C, SetUnionHashSet<String>>;
Expand description

Value stored in a table. Modelled as a timestamped set of strings.

Each value is timestamped with the time at which it was last updated. Concurrent updates at the same timestamp are stored as a set.

Aliased Type§

struct RowValue<C> {
    pub key: C,
    /* private fields */
}

Fields§

§key: C

The Key of the dominating pair lattice, usually a timestamp.

This field is public as it is always monotonically increasing in its lattice.

Implementations

§

impl<Key, Val> DomPair<Key, Val>

pub fn new(key: Key, val: Val) -> DomPair<Key, Val>

Create a DomPair from the given Key and Val.

pub fn new_from(key: impl Into<Key>, val: impl Into<Val>) -> DomPair<Key, Val>

Create a DomPair from the given Into<Key> and Into<Val>.

pub fn as_reveal_ref(&self) -> (&Key, &Val)

Reveal the inner value as a shared reference.

pub fn as_reveal_mut(&mut self) -> (&mut Key, &mut Val)

Reveal the inner value as an exclusive reference.

pub fn into_reveal(self) -> (Key, Val)

Gets the inner by value, consuming self.

Trait Implementations

§

impl<Key, Val> Clone for DomPair<Key, Val>
where Key: Clone, Val: Clone,

§

fn clone(&self) -> DomPair<Key, Val>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<Key, Val> Debug for DomPair<Key, Val>
where Key: Debug, Val: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<Key, Val> DeepReveal for DomPair<Key, Val>
where Key: DeepReveal, Val: DeepReveal,

§

type Revealed = (<Key as DeepReveal>::Revealed, <Val as DeepReveal>::Revealed)

The underlying type when revealed.
§

fn deep_reveal(self) -> <DomPair<Key, Val> as DeepReveal>::Revealed

Reveals the underlying lattice types recursively.
§

impl<Key, Val> Default for DomPair<Key, Val>
where Key: Default, Val: Default,

§

fn default() -> DomPair<Key, Val>

Returns the “default value” for a type. Read more
§

impl<'de, Key, Val> Deserialize<'de> for DomPair<Key, Val>
where Key: Deserialize<'de>, Val: Deserialize<'de>,

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<DomPair<Key, Val>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<Key, Val> IsBot for DomPair<Key, Val>
where Key: IsBot, Val: IsBot,

§

fn is_bot(&self) -> bool

Returns if self is lattice bottom (⊥). Read more
§

impl<Key, Val> IsTop for DomPair<Key, Val>
where Key: IsTop, Val: IsTop,

§

fn is_top(&self) -> bool

Returns if self is lattice top (⊤). Read more
§

impl<KeySelf, KeyOther, ValSelf, ValOther> LatticeFrom<DomPair<KeyOther, ValOther>> for DomPair<KeySelf, ValSelf>
where KeySelf: LatticeFrom<KeyOther>, ValSelf: LatticeFrom<ValOther>,

§

fn lattice_from(other: DomPair<KeyOther, ValOther>) -> DomPair<KeySelf, ValSelf>

Convert from the Other lattice into Self.
§

impl<KeySelf, KeyOther, ValSelf, ValOther> Merge<DomPair<KeyOther, ValOther>> for DomPair<KeySelf, ValSelf>
where KeySelf: Merge<KeyOther> + LatticeFrom<KeyOther> + PartialOrd<KeyOther>, ValSelf: Merge<ValOther> + LatticeFrom<ValOther>,

§

fn merge(&mut self, other: DomPair<KeyOther, ValOther>) -> bool

Merge other into the self lattice. Read more
§

fn merge_owned(this: Self, delta: Other) -> Self
where Self: Sized,

Merge this and delta together, returning the new value.
§

impl<KeySelf, KeyOther, ValSelf, ValOther> PartialEq<DomPair<KeyOther, ValOther>> for DomPair<KeySelf, ValSelf>
where KeySelf: PartialEq<KeyOther>, ValSelf: PartialEq<ValOther>,

§

fn eq(&self, other: &DomPair<KeyOther, ValOther>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<KeySelf, KeyOther, ValSelf, ValOther> PartialOrd<DomPair<KeyOther, ValOther>> for DomPair<KeySelf, ValSelf>
where KeySelf: PartialOrd<KeyOther>, ValSelf: PartialOrd<ValOther>,

§

fn partial_cmp(&self, other: &DomPair<KeyOther, ValOther>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl<Key, Val> Serialize for DomPair<Key, Val>
where Key: Serialize, Val: Serialize,

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<Key, Val> Copy for DomPair<Key, Val>
where Key: Copy, Val: Copy,

§

impl<Key, Val> Eq for DomPair<Key, Val>
where Key: Eq, Val: Eq,

§

impl<KeySelf, KeyOther, ValSelf, ValOther> LatticeOrd<DomPair<KeyOther, ValOther>> for DomPair<KeySelf, ValSelf>
where DomPair<KeySelf, ValSelf>: PartialOrd<DomPair<KeyOther, ValOther>>,