hash map

let name = HashMap::new();

"The type HashMap<K, V> stores a mapping of keys of type K to values of type V using a hashing function, which determines how it places these keys and values into memory. Many programming languages support this kind of data structure, but they often use a different name, such as hashmapobjecthash tabledictionary, or associative array, just to name a few."

Examples:

    let mut scores = HashMap::new();

    scores.insertfrom("Blue"), 10;
    scores.insertfrom("Yellow"), 50;


    for (key, value) in &scores {
        println!{"{key}: {value}"};
    }    

    let team_name = String::from("Blue");
    let score = scores.get(&team_name).copied().unwrap_or(0);

    println!("Team {}'s score is {}!", team_name, score);