pub trait FieldDiff: Hash {
type Path: Copy + Eq + Hash + Send + Sync + 'static;
// Required method
fn field_hashes(&self, out: &mut Vec<(Self::Path, u64)>);
}Expand description
State types implement this so subscribers can detect which fields changed by comparing per-field hashes — never by cloning the whole value.
Required Associated Types§
Required Methods§
Sourcefn field_hashes(&self, out: &mut Vec<(Self::Path, u64)>)
fn field_hashes(&self, out: &mut Vec<(Self::Path, u64)>)
Push (path, field_hash) for each tracked field.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".