Trait differential_dataflow::difference::Semigroup

source ·
pub trait Semigroup<Rhs: ?Sized = Self>: Clone + IsZero {
    // Required method
    fn plus_equals(&mut self, rhs: &Rhs);
}
Expand description

A type with addition and a test for zero.

These traits are currently the minimal requirements for a type to be a “difference” in differential dataflow. Addition allows differential dataflow to compact multiple updates to the same data, and the test for zero allows differential dataflow to retire updates that have no effect. There is no requirement that the test for zero ever return true, and the zero value does not need to inhabit the type.

There is a light presumption of commutativity here, in that while we will largely perform addition in order of timestamps, for many types of timestamps there is no total order and consequently no obvious order to respect. Non-commutative semigroups should be used with care.

Required Methods§

source

fn plus_equals(&mut self, rhs: &Rhs)

The method of std::ops::AddAssign, for types that do not implement AddAssign.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Semigroup for i8

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for i16

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for i32

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for i64

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for i128

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for isize

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for u8

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for u16

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for u32

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for u64

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for u128

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for ()

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for usize

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for Wrapping<i8>

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for Wrapping<i16>

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for Wrapping<i32>

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for Wrapping<i64>

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for Wrapping<i128>

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl Semigroup for Wrapping<isize>

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl<A1: Semigroup> Semigroup for (A1,)

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl<A1: Semigroup, B1: Semigroup> Semigroup for (A1, B1)

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl<A1: Semigroup, B1: Semigroup, C1: Semigroup> Semigroup for (A1, B1, C1)

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl<A1: Semigroup, B1: Semigroup, C1: Semigroup, D1: Semigroup> Semigroup for (A1, B1, C1, D1)

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl<R: Semigroup> Semigroup for Vec<R>

source§

fn plus_equals(&mut self, rhs: &Self)

source§

impl<R: Semigroup> Semigroup<[R]> for Vec<R>

source§

fn plus_equals(&mut self, rhs: &[R])

Implementors§

source§

impl Semigroup for Present

source§

impl<'a, S, T: Semigroup<S>> Semigroup<&'a S> for T