Skip to content

Glossary: Rust Basics

HashMap

Also written: hash map

A collection of key-value pairs: give it a key like a product name and it returns the stored value, such as a count. It keeps no order and needs `use std::collections::HashMap;`.

Where the book teaches it

Related terms

Key-value pairVecuse