Incerteza
Incerteza

Reputation: 34944

Creating an associative array in Rust

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?

Upvotes: 15

Views: 7289

Answers (1)

Chris Morgan
Chris Morgan

Reputation: 90902

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.

Upvotes: 23

Related Questions