pub trait DynHash {
// Required method
fn dyn_hash(&self, state: &mut dyn Hasher);
}
Expand description
A dynamic-dispatch version of the Hash
trait. Implemented for every type that implements
Any
+ Hash
.
The TypeId::of::<Self>()
value is included in the resulting hash, so the hash generated by
DynEqHash
will not match the hash generated by the underlying Hash
implementation. In other
words, the hash of T
will not match the hash of T as dyn SomeDynHashTrait
.