pub struct GCounter { /* private fields */ }Implementations§
Trait Implementations§
Source§impl DeltaCrdt for GCounter
impl DeltaCrdt for GCounter
Source§type Delta = HashMap<String, u64>
type Delta = HashMap<String, u64>
Delta is just the per-node increments accumulated since the last take. Merging adds to the recipient’s per-node count.
Source§fn take_delta(&mut self) -> Option<Self::Delta>
fn take_delta(&mut self) -> Option<Self::Delta>
Take and clear the accumulated local delta. Returns
None if
no local change has happened since the last call.Source§fn merge_delta(&mut self, delta: &Self::Delta)
fn merge_delta(&mut self, delta: &Self::Delta)
Merge an incoming delta into local state.
Source§impl<'de> Deserialize<'de> for GCounter
impl<'de> Deserialize<'de> for GCounter
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
Auto Trait Implementations§
impl Freeze for GCounter
impl RefUnwindSafe for GCounter
impl Send for GCounter
impl Sync for GCounter
impl Unpin for GCounter
impl UnsafeUnpin for GCounter
impl UnwindSafe for GCounter
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