pub struct Change<V> {
pub generation: u64,
pub operation: Operation<V>,
}Expand description
A row change carries the generation on the authoring device (§8.3).
Fields§
§generation: u64Generation at which the change was made.
operation: Operation<V>The change and the values it sets.
Implementations§
Source§impl<V> Change<V>
impl<V> Change<V>
Sourcepub fn validate(&self, row: &RowId) -> Result<(), MergeError>
pub fn validate(&self, row: &RowId) -> Result<(), MergeError>
Validate generation parity, advancement without overflow, and every
written parent’s generation and audience for this row (§8.3–§9.1, §15).
Values and their encodings are opaque here. The authoring database
establishes generation witnesses; crate::apply checks the received
change against applied metadata.
Sourcepub fn after(&self) -> Result<u64, MergeError>
pub fn after(&self) -> Result<u64, MergeError>
The row’s generation after this change: an insert or a delete advances it, an update keeps it (§8.3).
Sourcepub fn incarnation(&self) -> Result<u64, MergeError>
pub fn incarnation(&self) -> Result<u64, MergeError>
The incarnation this change belongs to: generation + 1 for an insert, generation for an update or delete. Invalid parity is a typed error.
Trait Implementations§
impl<V: Eq> Eq for Change<V>
impl<V> StructuralPartialEq for Change<V>
Auto Trait Implementations§
impl<V> Freeze for Change<V>
impl<V> RefUnwindSafe for Change<V>where
V: RefUnwindSafe,
impl<V> Send for Change<V>where
V: Send,
impl<V> Sync for Change<V>where
V: Sync,
impl<V> Unpin for Change<V>
impl<V> UnsafeUnpin for Change<V>
impl<V> UnwindSafe for Change<V>where
V: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more