[][src]Trait track::preclude::SerdeDiff

pub trait SerdeDiff {
    fn diff<S>(
        &self,
        ctx: &mut DiffContext<'a, S>,
        other: &Self
    ) -> Result<bool, <S as SerializeSeq>::Error>
    where
        S: SerializeSeq
;
fn apply<'de, A>(
        &mut self,
        seq: &mut A,
        ctx: &mut ApplyContext
    ) -> Result<bool, <A as SeqAccess<'de>>::Error>
    where
        A: SeqAccess<'de>
; }

Anything diffable implements this trait

Required methods

fn diff<S>(
    &self,
    ctx: &mut DiffContext<'a, S>,
    other: &Self
) -> Result<bool, <S as SerializeSeq>::Error> where
    S: SerializeSeq

Recursively walk the struct, invoking serialize_element on each member if the element is different. Returns true if any changes exist, otherwise false. After this call, the DiffContext will contain the data that has changed.

fn apply<'de, A>(
    &mut self,
    seq: &mut A,
    ctx: &mut ApplyContext
) -> Result<bool, <A as SeqAccess<'de>>::Error> where
    A: SeqAccess<'de>, 

Applies the diff to the struct. Returns true if the struct was changed, otherwise false.

Loading content...

Implementations on Foreign Types

impl SerdeDiff for NonZeroU16[src]

impl<T> SerdeDiff for [T; 28] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T10: SerdeDiff + Serialize + Deserialize<'a>,
    T11: SerdeDiff + Serialize + Deserialize<'a>,
    T12: SerdeDiff + Serialize + Deserialize<'a>,
    T13: SerdeDiff + Serialize + Deserialize<'a>,
    T14: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>,
    T8: SerdeDiff + Serialize + Deserialize<'a>,
    T9: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for [T; 6] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 64] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>,
    T8: SerdeDiff + Serialize + Deserialize<'a>,
    T9: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for [T; 1] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for IpAddr[src]

impl<T0, T1, T2, T3, T4> SerdeDiff for (T0, T1, T2, T3, T4) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for [T; 4] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 224] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for f32[src]

impl SerdeDiff for Duration[src]

impl SerdeDiff for f64[src]

impl<T> SerdeDiff for [T; 96] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for Ipv4Addr[src]

impl<T> SerdeDiff for [T; 200] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 72] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 13] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 2] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 384] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for u16[src]

impl<T> SerdeDiff for [T; 9] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 8] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T0> SerdeDiff for (T0,) where
    T0: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl SerdeDiff for SocketAddrV4[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T10: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>,
    T8: SerdeDiff + Serialize + Deserialize<'a>,
    T9: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for Option<T> where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for isize[src]

impl SerdeDiff for i32[src]

impl SerdeDiff for u64[src]

impl SerdeDiff for NonZeroU8[src]

impl<T0, T1, T2, T3, T4, T5> SerdeDiff for (T0, T1, T2, T3, T4, T5) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for [T; 18] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 19] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for PathBuf[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7, T8) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>,
    T8: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<K, V> SerdeDiff for HashMap<K, V, RandomState> where
    K: SerdeDiff + Serialize + Deserialize<'a> + Hash + Eq,
    V: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl SerdeDiff for SystemTime[src]

impl<T> SerdeDiff for [T; 5] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 100] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 14] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 128] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 32768] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for ()[src]

impl<T> SerdeDiff for [T; 3] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for i16[src]

impl<T> SerdeDiff for [T; 160] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 16] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 30] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 27] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for OsString[src]

impl SerdeDiff for String[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T10: SerdeDiff + Serialize + Deserialize<'a>,
    T11: SerdeDiff + Serialize + Deserialize<'a>,
    T12: SerdeDiff + Serialize + Deserialize<'a>,
    T13: SerdeDiff + Serialize + Deserialize<'a>,
    T14: SerdeDiff + Serialize + Deserialize<'a>,
    T15: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>,
    T8: SerdeDiff + Serialize + Deserialize<'a>,
    T9: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl SerdeDiff for char[src]

impl<T> SerdeDiff for [T; 10] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T0, T1, T2, T3> SerdeDiff for (T0, T1, T2, T3) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for [T; 7] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for i128[src]

impl SerdeDiff for CString[src]

impl<T> SerdeDiff for [T; 1024] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 2048] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 512] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for Vec<T> where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T10: SerdeDiff + Serialize + Deserialize<'a>,
    T11: SerdeDiff + Serialize + Deserialize<'a>,
    T12: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>,
    T8: SerdeDiff + Serialize + Deserialize<'a>,
    T9: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for [T; 192] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 23] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for NonZeroU32[src]

impl<T0, T1, T2> SerdeDiff for (T0, T1, T2) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T10: SerdeDiff + Serialize + Deserialize<'a>,
    T11: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>,
    T8: SerdeDiff + Serialize + Deserialize<'a>,
    T9: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl SerdeDiff for usize[src]

impl<T> SerdeDiff for [T; 4096] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for bool[src]

impl<T> SerdeDiff for [T; 12] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 20] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for SocketAddr[src]

impl<T> SerdeDiff for [T; 26] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for Ipv6Addr[src]

impl<T> SerdeDiff for [T; 15] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for SocketAddrV6[src]

impl SerdeDiff for u8[src]

impl SerdeDiff for i8[src]

impl<T> SerdeDiff for [T; 29] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T0, T1> SerdeDiff for (T0, T1) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for [T; 8192] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 11] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 22] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 17] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 25] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 768] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T0, T1, T2, T3, T4, T5, T6> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<K, V> SerdeDiff for BTreeMap<K, V> where
    K: SerdeDiff + Serialize + Deserialize<'a> + Ord,
    V: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl SerdeDiff for i64[src]

impl<T> SerdeDiff for [T; 50] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 32] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for NonZeroU64[src]

impl SerdeDiff for u128[src]

impl<T> SerdeDiff for [T; 65536] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> SerdeDiff for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) where
    T0: SerdeDiff + Serialize + Deserialize<'a>,
    T1: SerdeDiff + Serialize + Deserialize<'a>,
    T10: SerdeDiff + Serialize + Deserialize<'a>,
    T11: SerdeDiff + Serialize + Deserialize<'a>,
    T12: SerdeDiff + Serialize + Deserialize<'a>,
    T13: SerdeDiff + Serialize + Deserialize<'a>,
    T2: SerdeDiff + Serialize + Deserialize<'a>,
    T3: SerdeDiff + Serialize + Deserialize<'a>,
    T4: SerdeDiff + Serialize + Deserialize<'a>,
    T5: SerdeDiff + Serialize + Deserialize<'a>,
    T6: SerdeDiff + Serialize + Deserialize<'a>,
    T7: SerdeDiff + Serialize + Deserialize<'a>,
    T8: SerdeDiff + Serialize + Deserialize<'a>,
    T9: SerdeDiff + Serialize + Deserialize<'a>, 
[src]

impl<T> SerdeDiff for [T; 16384] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 31] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 40] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 48] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl SerdeDiff for u32[src]

impl<T> SerdeDiff for [T; 24] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 21] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 256] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

impl<T> SerdeDiff for [T; 56] where
    T: SerdeDiff + Deserialize<'a> + Serialize
[src]

Loading content...

Implementors

Loading content...