pub enum CrdtOperation {
UpdatePosition {
node_id: NodeId,
position: Position,
timestamp: Timestamp,
},
UpdateHealth {
node_id: NodeId,
status: HealthStatus,
timestamp: Timestamp,
},
IncrementCounter {
counter_id: u8,
node_id: NodeId,
amount: u64,
},
UpdateRegister {
key: String,
value: Vec<u8>,
timestamp: Timestamp,
node_id: NodeId,
},
}Expand description
CRDT operation types for sync
Variants§
UpdatePosition
Update a position register
Fields
UpdateHealth
Update health status register
Fields
§
status: HealthStatusHealth status data
IncrementCounter
Increment a counter
Fields
UpdateRegister
Generic LWW update (key-value)
Implementations§
Trait Implementations§
Source§impl Clone for CrdtOperation
impl Clone for CrdtOperation
Source§fn clone(&self) -> CrdtOperation
fn clone(&self) -> CrdtOperation
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 moreAuto Trait Implementations§
impl Freeze for CrdtOperation
impl RefUnwindSafe for CrdtOperation
impl Send for CrdtOperation
impl Sync for CrdtOperation
impl Unpin for CrdtOperation
impl UnwindSafe for CrdtOperation
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