pub trait DefaultHashable {
// Required method
fn hash_key(&self) -> usize;
}Expand description
Key types which can be hashed by DefaultHashTraits.
This is the Rust analog of the static GetHash method which C++’s fbl::DefaultHashTraits
requires. Implementations should return what amounts to a “large number”; the hash table
takes it modulo its bucket count to determine the bucket index.
This trait is implemented for all primitive integer types, returning the value of the integer
itself (converted with as usize).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".