pub trait NumHash {
    fn num_hash<H: Hasher>(&self, state: &mut H);
}
Expand description

Consistent hash implementation among different numeric types.

It’s ensured that if a.num_eq(b), then a and b will result in the same hash. Although the other direction is not ensured because it’s infeasible, the hash function is still designed to be as sparse as possible.

Required Methods

Consistent Hash::hash on different numeric types.

This function will ensures if a.num_eq(b), then a.num_hash() and b.num_hash() manipulate the state in the same way.

Implementations on Foreign Types

Implementors