pub trait DeltaCRDT: Lattice {
type Delta: Lattice;
// Required methods
fn split_delta(&mut self) -> Option<Self::Delta>;
fn apply_delta(&mut self, delta: &Self::Delta);
}Expand description
Marker trait for CRDTs that support delta operations
Required Associated Types§
Required Methods§
Sourcefn split_delta(&mut self) -> Option<Self::Delta>
fn split_delta(&mut self) -> Option<Self::Delta>
Split off pending deltas, returning them and resetting internal delta buffer
Sourcefn apply_delta(&mut self, delta: &Self::Delta)
fn apply_delta(&mut self, delta: &Self::Delta)
Apply a delta to the state
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.