[][src]Trait deltoid::Deltoid

pub trait Deltoid: Sized + PartialEq + Clone + Debug {
    type Delta: Clone + Debug + PartialEq + Serialize + for<'de> Deserialize<'de>;
    fn apply_delta(&self, delta: &Self::Delta) -> DeltaResult<Self>;
fn delta(&self, other: &Self) -> DeltaResult<Self::Delta>; fn inverse_delta(&self, other: &Self) -> DeltaResult<Self::Delta> { ... } }

Definitions for delta operations.

Associated Types

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

Loading content...

Required methods

fn apply_delta(&self, delta: &Self::Delta) -> DeltaResult<Self>

Calculate a new instance of Self based on self and delta i.e. calculate self --[delta]--> other. ^^^^^

fn delta(&self, other: &Self) -> DeltaResult<Self::Delta>

Calculate self --[delta]--> other. ^^^^^

Loading content...

Provided methods

fn inverse_delta(&self, other: &Self) -> DeltaResult<Self::Delta>

Calculate other --[delta]--> self. ^^^^^

Loading content...

Implementations on Foreign Types

impl<'a, B> Deltoid for Cow<'a, B> where
    B: Clone + Debug + PartialEq + Deltoid + ToOwned + Serialize + for<'de> Deserialize<'de>,
    <B as ToOwned>::Owned: Debug
[src]

type Delta = CowDelta<'a, B>

impl<T> Deltoid for Box<T> where
    T: Deltoid + PartialEq + Clone + Debug + for<'de> Deserialize<'de> + Serialize
[src]

type Delta = BoxDelta<T>

impl<K, V> Deltoid for BTreeMap<K, V> where
    K: Deltoid + PartialEq + Clone + Debug + Ord + for<'de> Deserialize<'de> + Serialize + FromDelta + IntoDelta,
    V: Deltoid + for<'de> Deserialize<'de> + Serialize + FromDelta + IntoDelta
[src]

type Delta = BTreeMapDelta<K, V>

impl<K, V> Deltoid for HashMap<K, V> where
    K: Deltoid + PartialEq + Eq + Clone + Debug + Ord + Hash + for<'de> Deserialize<'de> + Serialize + FromDelta + IntoDelta,
    V: Deltoid + for<'de> Deserialize<'de> + Serialize + FromDelta + IntoDelta
[src]

type Delta = HashMapDelta<K, V>

impl<T> Deltoid for Option<T> where
    T: Deltoid + PartialEq + Clone + Debug + for<'de> Deserialize<'de> + Serialize + IntoDelta + FromDelta
[src]

type Delta = OptionDelta<T>

impl<T> Deltoid for Range<T> where
    T: Clone + PartialEq + Deltoid + Debug + Serialize + for<'de> Deserialize<'de> + IntoDelta + FromDelta
[src]

type Delta = RangeDelta<T>

impl<T> Deltoid for Rc<T> where
    T: Deltoid + PartialEq + Clone + Debug + for<'de> Deserialize<'de> + Serialize
[src]

type Delta = RcDelta<T>

impl Deltoid for String[src]

type Delta = StringDelta

impl<T> Deltoid for Arc<T> where
    T: Deltoid + PartialEq + Clone + Debug + for<'de> Deserialize<'de> + Serialize
[src]

type Delta = ArcDelta<T>

impl<T0> Deltoid for (T0,) where
    T0: Deltoid + Clone + PartialEq
[src]

type Delta = (<T0 as Deltoid>::Delta,)

impl<T0, T1> Deltoid for (T0, T1) where
    T0: Deltoid + Clone + PartialEq,
    T1: Deltoid + Clone + PartialEq
[src]

type Delta = (<T0 as Deltoid>::Delta, <T1 as Deltoid>::Delta)

impl<T0, T1, T2> Deltoid for (T0, T1, T2) where
    T0: Deltoid + Clone + PartialEq,
    T1: Deltoid + Clone + PartialEq,
    T2: Deltoid + Clone + PartialEq
[src]

type Delta = (<T0 as Deltoid>::Delta, <T1 as Deltoid>::Delta, <T2 as Deltoid>::Delta)

impl<T0, T1, T2, T3> Deltoid for (T0, T1, T2, T3) where
    T0: Deltoid + Clone + PartialEq,
    T1: Deltoid + Clone + PartialEq,
    T2: Deltoid + Clone + PartialEq,
    T3: Deltoid + Clone + PartialEq
[src]

type Delta = (<T0 as Deltoid>::Delta, <T1 as Deltoid>::Delta, <T2 as Deltoid>::Delta, <T3 as Deltoid>::Delta)

impl<T> Deltoid for Vec<T> where
    T: Clone + PartialEq + Deltoid + Debug + Serialize + for<'de> Deserialize<'de> + IntoDelta + FromDelta
[src]

type Delta = VecDelta<T>

impl Deltoid for i8[src]

type Delta = I8Delta

impl Deltoid for i16[src]

type Delta = I16Delta

impl Deltoid for i32[src]

type Delta = I32Delta

impl Deltoid for i64[src]

type Delta = I64Delta

impl Deltoid for i128[src]

type Delta = I128Delt

impl Deltoid for isize[src]

type Delta = IsizeDelta

impl Deltoid for u8[src]

type Delta = U8Delta

impl Deltoid for u16[src]

type Delta = U16Delta

impl Deltoid for u32[src]

type Delta = U32Delta

impl Deltoid for u64[src]

type Delta = U64Delta

impl Deltoid for u128[src]

type Delta = U128Delta

impl Deltoid for usize[src]

type Delta = UsizeDelta

impl Deltoid for f32[src]

type Delta = F32Delta

impl Deltoid for f64[src]

type Delta = F64Delta

impl Deltoid for bool[src]

type Delta = BoolDelta

impl Deltoid for char[src]

type Delta = CharDelta

impl Deltoid for ()[src]

type Delta = UnitDelta

Loading content...

Implementors

impl<T> Deltoid for RwLock<T> where
    T: Deltoid + for<'de> Deserialize<'de> + Serialize
[src]

type Delta = RwLockDelta<T>

Loading content...