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?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.