pub trait Diff:
Debug
+ Serialize
+ DeserializeOwned
+ Sync
+ Send
+ Clone
+ PartialEq
+ 'static
+ Unpin {
type Delta: Debug + Serialize + DeserializeOwned + Sync + Send + Clone + 'static + Unpin;
// Required methods
fn diff(&self, to: &Self) -> Self::Delta;
fn update(&mut self, delta: &Self::Delta);
}
Expand description
A diffable type
For Copy types implementation just uses the type itself as delta.
Most of the trait bounds should not be here, but are because of https://github.com/rust-lang/rust/issues/20671
Required Associated Types§
Required Methods§
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.