pub trait Diffable {
    type Delta;

    fn diff(&self, other: &Self) -> Self::Delta;
}
Expand description

A trait capturing the notion of a type where a delta can be computed between two of its items. For example, given a1=[0,1,2] and a2=[1,1,2], we could compute a delta d such that a1.transform_into(d) returns a2. Observe that the delta has an orientation which (implicitly) means it goes from this item to the other,

Required Associated Types

Required Methods

Compute a diff between this item and another, yielding a delta d such that this.transform(d) == other holds.

Implementors