I was looking for the way to create an associative array in the documentation but didn't find anything. So how do I create an associative array in Rust?
Asked
Active
Viewed 5,699 times
1 Answers
23
What you know as an associative array is also known by some other names, such as a dictionary or a map.
In Rust, it’s called a map, and is epitomised in the HashMap
type.

Chris Morgan
- 86,207
- 24
- 208
- 215
-
1When you want ordered associative array, there is also [`BTreeMap`](https://doc.rust-lang.org/std/collections/struct.BTreeMap.html). – Code4R7 Jul 17 '22 at 04:52