Check out example codes for "how to make map in rust language". It will help you in understanding the concepts better.

Code Example 1

fn main() {
    use std::collections::HashMap;

    let mut scores = HashMap::new();

    scores.insert(String::from("Blue"), 10);
    scores.insert(String::from("Yellow"), 50);
}

Learn ReactJs, React Native from akashmittal.com