Skip to main content

structural_fingerprint

Function structural_fingerprint 

Source
pub fn structural_fingerprint<T: Serialize + ?Sized>(node: &T) -> u64
Expand description

A 64-bit hash of node’s structure that ignores every Span.

Equal nodes always produce equal fingerprints; two different nodes collide with probability around 2^-64, ample for comparing a node with its previous version. The value is deterministic within one build but not guaranteed to be stable across versions of this crate or of Rust, so use it for in-memory comparison rather than persisting it.