8.6.0. Chapter Overview
Chapter 8 is mainly about common collections in Rust. Rust provides many collection-like data structures, and these collections can hold many values. However, the collections covered in Chapter 8 are different from arrays and tuples.
The collections in Chapter 8 are stored on the heap rather than on the stack. That also means their size does not need to be known at compile time; at runtime, they can grow or shrink dynamically.
This chapter focuses on three collections: Vector, String, and HashMap (this article).
If you find this helpful, please like, bookmark, and follow. To keep learning along, follow this series.
8.6.1. Updating a HashMap
A variable-sized HashMap means that the number of key-value pairs can change. However, at any given moment, one key can correspond to only one value. When you want to update data in a HashMap, there are several possible cases:
The key you want to update already has a corresponding value in the Has
Discussion
Take the lead—comment now
Lead the way—your insights can inspire others.