pub struct Sum;Expand description
Additive commutative monoid: old ⊕ op = old + op. Associative and
commutative, not idempotent (re-adding double-counts). The
unordered-exactly-once tier (analysis §2): a running counter / sum.
Trait Implementations§
Source§impl<T> MergePolicy<T> for Sum
impl<T> MergePolicy<T> for Sum
Source§const COMMUTATIVE: bool = true
const COMMUTATIVE: bool = true
true iff ⊕ is commutative — reordering ops converges to the same
state (merge(merge(a, b), c) == merge(merge(a, c), b)).Source§const IDEMPOTENT: bool = false
const IDEMPOTENT: bool = false
true iff ⊕ is idempotent — re-applying an op is a no-op
(merge(merge(a, b), b) == merge(a, b)).Source§const CONFLATES: bool = true
const CONFLATES: bool = true
true iff coalescing (merging accumulated ops into one) actually bounds
the state — the precondition for the Conflate overflow action. All
conflating policies (band / monoid / semilattice) bound; only RawFifo
(concat: order + multiplicity are meaning) grows without bound, so it
cannot conflate and a relay MUST reject Conflate for it (analysis §4.3).Auto Trait Implementations§
impl Freeze for Sum
impl RefUnwindSafe for Sum
impl Send for Sum
impl Sync for Sum
impl Unpin for Sum
impl UnsafeUnpin for Sum
impl UnwindSafe for Sum
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