Collections and things
Collections are dynamic data structures. The amount of data does not need to be known at compile time and can grow or shrink as the program runs.
Under the hood, it uses a global dynamic memory allocator (AKA the heap)
Vec<T>
String
HashMap<K, V>
Vectors allow you to store more than one value in a single data structure that puts all the values next to each other in memory.
Vectors can only store values of the same type.
// An array let arr = [0, 1, 2, 3, 4];
// A slice of a: 1, 2, and 3 let middle = &arr[1..4];
// A vector
let v = vec![1, 2, 3];
v.push(6);
Strings are growable, mutable, owned, UTF-8 encoded string type.
String && &str (string slice)
Text