pub struct GenericCrdtField {
pub name: String,
pub value: Value,
pub strategy: CrdtStrategy,
pub metadata: HashMap<String, Value>,
}Expand description
Generic CRDT field implementation
Fields§
§name: StringField name
value: ValueField value
strategy: CrdtStrategyCRDT strategy
metadata: HashMap<String, Value>Field metadata (timestamps, replica IDs, etc.)
Implementations§
Source§impl GenericCrdtField
impl GenericCrdtField
Sourcepub fn new(name: String, value: Value, strategy: CrdtStrategy) -> Self
pub fn new(name: String, value: Value, strategy: CrdtStrategy) -> Self
Create a new generic CRDT field
Trait Implementations§
Source§impl Clone for GenericCrdtField
impl Clone for GenericCrdtField
Source§fn clone(&self) -> GenericCrdtField
fn clone(&self) -> GenericCrdtField
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CrdtField for GenericCrdtField
impl CrdtField for GenericCrdtField
Source§fn has_conflict(&self, other: &Self) -> bool
fn has_conflict(&self, other: &Self) -> bool
Check if there’s a conflict with another field
Source§fn strategy(&self) -> CrdtStrategy
fn strategy(&self) -> CrdtStrategy
Get the field strategy
Source§impl Debug for GenericCrdtField
impl Debug for GenericCrdtField
Source§impl<'de> Deserialize<'de> for GenericCrdtField
impl<'de> Deserialize<'de> for GenericCrdtField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GenericCrdtField
impl PartialEq for GenericCrdtField
Source§impl Serialize for GenericCrdtField
impl Serialize for GenericCrdtField
impl StructuralPartialEq for GenericCrdtField
Auto Trait Implementations§
impl Freeze for GenericCrdtField
impl RefUnwindSafe for GenericCrdtField
impl Send for GenericCrdtField
impl Sync for GenericCrdtField
impl Unpin for GenericCrdtField
impl UnwindSafe for GenericCrdtField
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