pub trait StableHash {
// Required method
fn stable_hash<H: StableHasher>(
&self,
field_address: H::Addr,
state: &mut H,
);
}Expand description
Like Hash, but consistent across:
- builds (independent of rustc version or std implementation details)
- platforms (eg: 32 bit & 64 bit, x68 and ARM)
- processes (multiple runs of the same program)
For examples of best practices when implementing: See also d3ba3adc-6e9b-4586-a7e7-6b542df39462
Required Methods§
fn stable_hash<H: StableHasher>(&self, field_address: H::Addr, state: &mut H)
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.