pub trait CrdtField:
Clone
+ Send
+ Sync {
// Required methods
fn get_value(&self) -> Value;
fn set_value(&mut self, value: Value) -> Result<(), BuilderError>;
fn merge(&mut self, other: &Self) -> Result<(), BuilderError>;
fn has_conflict(&self, other: &Self) -> bool;
fn strategy(&self) -> CrdtStrategy;
}Expand description
Trait for CRDT field operations
Required Methods§
Sourcefn merge(&mut self, other: &Self) -> Result<(), BuilderError>
fn merge(&mut self, other: &Self) -> Result<(), BuilderError>
Merge with another field
Sourcefn has_conflict(&self, other: &Self) -> bool
fn has_conflict(&self, other: &Self) -> bool
Check if there’s a conflict with another field
Sourcefn strategy(&self) -> CrdtStrategy
fn strategy(&self) -> CrdtStrategy
Get the field strategy
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.