pub trait HashTraits<K: ?Sized> {
// Required method
fn get_hash(key: &K) -> usize;
}Expand description
Traits defining the hash function used by a HashTable to select a bucket for a key.
get_hash may return any usize; the hash table reduces it modulo its bucket count to
determine the index of the bucket the key belongs in.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".