Skip to content

Glossary: Algorithms Beyond the Basics in Rust

Hash and Eq

Also written: Hash, Eq, trait bounds

The two traits a type needs to be a `HashMap` key or `HashSet` item. Integers, strings, chars and tuples of them qualify, but `f64` does not because NaN is not equal to itself.

Where the book teaches it

Related terms

HashSetMemoization