Diff

Trait 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.

Dyn CompatibilityΒ§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign TypesΒ§

SourceΒ§

impl Diff for Value

The Diff implementation for serde_json::Value.

SourceΒ§

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 bool

SourceΒ§

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

SourceΒ§

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 f32

SourceΒ§

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

SourceΒ§

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 Diff for i8

SourceΒ§

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 Diff for i16

SourceΒ§

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 i32

SourceΒ§

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 i64

SourceΒ§

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 Diff for i128

SourceΒ§

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 isize

SourceΒ§

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 u8

SourceΒ§

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 u16

SourceΒ§

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

SourceΒ§

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 u64

SourceΒ§

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 u128

SourceΒ§

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 ()

SourceΒ§

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 Diff for usize

SourceΒ§

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 BTreeMap<String, Value>

SourceΒ§

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 String

Diff trait implementation for String.

SourceΒ§

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<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>

SourceΒ§

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<T> Diff for Option<T>
where T: Diff + Clone + Debug + PartialEq + Default + for<'de> Deserialize<'de> + Serialize,

Diff Implementation for Option<T>

SourceΒ§

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.

SourceΒ§

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

Diff trait implementation for Vec<T>

SourceΒ§

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<T> Diff for HashSet<T>
where T: Debug + Clone + PartialEq + Eq + Diff + Hash + for<'de> Deserialize<'de> + Serialize,

SourceΒ§

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

ImplementorsΒ§