pub trait SerdeDiff {
// Required methods
fn diff<'a, S: SerializeSeq>(
&self,
ctx: &mut DiffContext<'a, S>,
other: &Self,
) -> Result<bool, S::Error>;
fn apply<'de, A>(
&mut self,
seq: &mut A,
ctx: &mut ApplyContext,
) -> Result<bool, <A as SeqAccess<'de>>::Error>
where A: SeqAccess<'de>;
}
Expand description
Anything diffable implements this trait
Required Methods§
Sourcefn diff<'a, S: SerializeSeq>(
&self,
ctx: &mut DiffContext<'a, S>,
other: &Self,
) -> Result<bool, S::Error>
fn diff<'a, S: SerializeSeq>( &self, ctx: &mut DiffContext<'a, S>, other: &Self, ) -> Result<bool, S::Error>
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.
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.