pub struct Change<K, C, V> {
pub record_id: K,
pub col_name: Option<C>,
pub value: Option<V>,
pub col_version: u64,
pub db_version: u64,
pub node_id: NodeId,
pub local_db_version: u64,
pub flags: u32,
}Expand description
Represents a single change in the CRDT.
A change can represent:
- An insertion or update of a column value (when
col_nameisSome) - A deletion of a specific column (when
col_nameisSomeandvalueisNone) - A deletion of an entire record (when
col_nameisNone)
Fields§
§record_id: K§col_name: Option<C>None represents tombstone of the record
value: Option<V>None represents deletion of the column (not the record)
col_version: u64§db_version: u64§node_id: NodeId§local_db_version: u64Local db_version when the change was created (useful for get_changes_since)
flags: u32Optional flags to indicate the type of change (ephemeral, not stored)
Implementations§
Trait Implementations§
impl<K: Eq, C: Eq, V: Eq> Eq for Change<K, C, V>
impl<K, C, V> StructuralPartialEq for Change<K, C, V>
Auto Trait Implementations§
impl<K, C, V> Freeze for Change<K, C, V>
impl<K, C, V> RefUnwindSafe for Change<K, C, V>
impl<K, C, V> Send for Change<K, C, V>
impl<K, C, V> Sync for Change<K, C, V>
impl<K, C, V> Unpin for Change<K, C, V>
impl<K, C, V> UnwindSafe for Change<K, C, V>
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