Trait identity_diff::Diff

source ·
pub trait Diff: Clone + Debug + PartialEq {
    type Type: Sized + Clone + Debug + PartialEq + for<'de> Deserialize<'de> + Serialize;

    // Required methods
    fn diff(&self, other: &Self) -> Result<Self::Type>;
    fn merge(&self, diff: Self::Type) -> Result<Self>;
    fn from_diff(diff: Self::Type) -> Result<Self>;
    fn into_diff(self) -> Result<Self::Type>;
}
👎Deprecated since 0.5.0: diff chain features are slated for removal
Expand description

The primary Diff Trait type.

Required Associated Types§

source

type Type: Sized + Clone + Debug + PartialEq + for<'de> Deserialize<'de> + Serialize

👎Deprecated since 0.5.0: diff chain features are slated for removal

The Corresponding Diff Type for the implemented Type.

Required Methods§

source

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Finds the difference between two types; self and other and returns Self::Type

source

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Merges a Self::Type with Self

source

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts a diff of type Self::Type to a Self.

source

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts a type of Self to a diff of Self::Type.

Implementations on Foreign Types§

source§

impl Diff for i32

§

type Type = Diffi32

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for i128

§

type Type = Diffi128

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for u16

§

type Type = Diffu16

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for u32

§

type Type = Diffu32

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for BTreeMap<String, Value>

§

type Type = DiffHashMap<String, Value>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for isize

§

type Type = DiffiSize

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for ()

§

type Type = Diffunit

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl<T> Diff for Vec<T>where T: Clone + Debug + PartialEq + Diff + for<'de> Deserialize<'de> + Serialize,

Diff trait implementation for Vec<T>

§

type Type = DiffVec<T>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Corresponding Diff Type for Vec<T>

source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Compares two Vec<T> types; self, other and returns a DiffVec<T> type.

source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Merges a DiffVec<T>; diff with self; a Vec<T> to create a new Vec<T>.

source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts a DiffVec<T>; diff into a Vec<T>.

source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts a Vec<T> into a DiffVec<T>

source§

impl Diff for u64

§

type Type = Diffu64

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for usize

§

type Type = DiffuSize

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for bool

§

type Type = Diffbool

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for char

§

type Type = Diffchar

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for i16

§

type Type = Diffi16

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for u128

§

type Type = Diffu128

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for Value

The Diff implementation for serde_json::Value.

§

type Type = DiffValue

👎Deprecated since 0.5.0: diff chain features are slated for removal

The Diff Type for serde_json::Value.

source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Compares two serde_json::Value types; self, diff and outputs a DiffValue type.

source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Merges a DiffValue; diff with self; a serde_json::Value to create a new serde_json::Value.

source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts from a diff of type DiffValue to a serde_json::Value.

source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

converts a serde_json::Value to a DiffValue.

source§

impl Diff for u8

§

type Type = Diffu8

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for i64

§

type Type = Diffi64

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl<K, V> Diff for HashMap<K, V>where K: Clone + Debug + PartialEq + Eq + Hash + Diff + for<'de> Deserialize<'de> + Serialize, V: Clone + Debug + PartialEq + Diff + for<'de> Deserialize<'de> + Serialize,

Diff Implementation on a HashMap<K, V>

§

type Type = DiffHashMap<K, V>

👎Deprecated since 0.5.0: diff chain features are slated for removal

the Diff type of the HashMap<K, V>

source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Diffs two HashMaps; self and other and creates a DiffHashMap<K, V>

source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Merges the changes in a DiffHashMap<K, V>, diff with a HashMap<K, V>, self.

source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts a DiffHashMap<K, V>, diff into a HashMap<K, V>.

source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts a HashMap<K, V>, diff into a DiffHashMap<K, V>.

source§

impl Diff for String

Diff trait implementation for String.

§

type Type = DiffString

👎Deprecated since 0.5.0: diff chain features are slated for removal

Diff type for String

source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

compares two String types; self, other and returns a DiffString type.

source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Merges a DiffString; diff with a String; self.

source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts a DiffString into a String type.

source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Converts a String into a DiffString type.

source§

impl Diff for i8

§

type Type = Diffi8

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl<T> Diff for HashSet<T>where T: Debug + Clone + PartialEq + Eq + Diff + Hash + for<'de> Deserialize<'de> + Serialize,

§

type Type = DiffHashSet<T>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for f32

§

type Type = DiffF32

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl Diff for f64

§

type Type = DiffF64

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal
source§

impl<T> Diff for Option<T>where T: Diff + Clone + Debug + PartialEq + Default + for<'de> Deserialize<'de> + Serialize,

Diff Implementation for Option<T>

§

type Type = DiffOption<T>

👎Deprecated since 0.5.0: diff chain features are slated for removal

The Corresponding Diff type for Option<T>

source§

fn diff(&self, other: &Self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Compares two Option<T> types; self and other and finds the Difference between them, returning a DiffOption<T> type.

source§

fn merge(&self, diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

Merges a DiffOption<T>; diff type with an Option<T> type; self.

source§

fn from_diff(diff: Self::Type) -> Result<Self>

👎Deprecated since 0.5.0: diff chain features are slated for removal

converts a DiffOption<T>; diff to an Option<T> type.

source§

fn into_diff(self) -> Result<Self::Type>

👎Deprecated since 0.5.0: diff chain features are slated for removal

converts a Option<T>; self to an DiffOption<T> type.

Implementors§