pub struct SignedSum { /* private fields */ }Expand description
Per-node positive / negative accumulators for one signed exposure.
Both accumulators are grow-only per node; the net exposure is
sum(pos) - sum(neg). See the module-level docs for convergence and
overflow semantics.
Implementations§
Source§impl SignedSum
impl SignedSum
pub fn new() -> Self
Trait Implementations§
Source§impl DeltaCrdt for SignedSum
impl DeltaCrdt for SignedSum
Source§type Delta = SignedSumDelta
type Delta = SignedSumDelta
Per-CRDT delta type — typically
Self for small CRDTs, a
sub-state for set / map shapes.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 SignedSum
impl<'de> Deserialize<'de> for SignedSum
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
impl Eq for SignedSum
impl StructuralPartialEq for SignedSum
Auto Trait Implementations§
impl Freeze for SignedSum
impl RefUnwindSafe for SignedSum
impl Send for SignedSum
impl Sync for SignedSum
impl Unpin for SignedSum
impl UnsafeUnpin for SignedSum
impl UnwindSafe for SignedSum
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