[][src]Struct differential_dataflow::difference::DiffPair

pub struct DiffPair<R1, R2> {
    pub element1: R1,
    pub element2: R2,
}

The difference defined by a pair of difference elements.

This type is essentially a "pair", though in Rust the tuple types do not derive the numeric traits we require, and so we need to emulate the types ourselves. In the interest of ergonomics, we may eventually replace the numeric traits with our own, so that we can implement them for tuples and allow users to ignore details like these.

Fields

element1: R1

The first element in the pair.

element2: R2

The second element in the pair.

Methods

impl<R1, R2> DiffPair<R1, R2>[src]

pub fn new(elt1: R1, elt2: R2) -> Self[src]

Creates a new Diff pair from two elements.

Trait Implementations

impl<R1: Monoid, R2: Monoid> Monoid for DiffPair<R1, R2>[src]

fn is_zero(&self) -> bool[src]

Returns true if the element is the additive identity. Read more

impl<R1: Clone, R2: Clone> Clone for DiffPair<R1, R2>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<R1: PartialEq, R2: PartialEq> PartialEq<DiffPair<R1, R2>> for DiffPair<R1, R2>[src]

impl<R1: PartialOrd, R2: PartialOrd> PartialOrd<DiffPair<R1, R2>> for DiffPair<R1, R2>[src]

impl<R1: Ord, R2: Ord> Ord for DiffPair<R1, R2>[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more

impl<R1: Eq, R2: Eq> Eq for DiffPair<R1, R2>[src]

impl<R1: Copy, R2: Copy> Copy for DiffPair<R1, R2>[src]

impl<T: Copy, R1: Mul<T>, R2: Mul<T>> Mul<T> for DiffPair<R1, R2>[src]

type Output = DiffPair<<R1 as Mul<T>>::Output, <R2 as Mul<T>>::Output>

The resulting type after applying the * operator.

impl<R1: Neg, R2: Neg> Neg for DiffPair<R1, R2>[src]

type Output = DiffPair<<R1 as Neg>::Output, <R2 as Neg>::Output>

The resulting type after applying the - operator.

impl<'a, R1: AddAssign<&'a R1>, R2: AddAssign<&'a R2>> AddAssign<&'a DiffPair<R1, R2>> for DiffPair<R1, R2>[src]

impl<R1: Debug, R2: Debug> Debug for DiffPair<R1, R2>[src]

impl<R1, R2> Abomonation for DiffPair<R1, R2> where
    R1: Abomonation,
    R2: Abomonation
[src]

impl<R1, R2> Serialize for DiffPair<R1, R2> where
    R1: Serialize,
    R2: Serialize
[src]

impl<'de, R1, R2> Deserialize<'de> for DiffPair<R1, R2> where
    R1: Deserialize<'de>,
    R2: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<R1, R2> Send for DiffPair<R1, R2> where
    R1: Send,
    R2: Send

impl<R1, R2> Sync for DiffPair<R1, R2> where
    R1: Sync,
    R2: Sync

Blanket Implementations

impl<T> Data for T where
    T: Ord + Debug + ExchangeData
[src]

impl<T> Abelian for T where
    T: Monoid + Neg<Output = T>, 
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Data for T where
    T: 'static + Send + Sync + Any + Abomonation

impl<T> Data for T where
    T: 'static + Clone
[src]

impl<T> ExchangeData for T where
    T: Data + Data, 
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]