Common rust collections
Storing lists of values with vectors
Vectors allow you to store more than one value in a single data structure that puts
all values next to each other in memory.
Storing UTF-8 encoded text with Strings
Rust strings don’t support indexing, i.e. it’s not possible to do the following:
A String
is a wrapper over a Vec<u8>
which is the numerical representation of the characters.
To iterate over strings:
Storing keys with associated values in hash maps
Hash maps and ownership
Accessing values in a hash map
Updating a Hash map