Odak modu

Rust Fundamentals

Collections:HashMap

HashMaps store values by key, whereas vectors store data by integer index. Keys in a HashMap can be booleans, integers, strings, or any other type. Per Rust Official documentation use a hashmap when:

  • You want to associate arbitrary keys with an arbitrary value.
  • You want a cache.
  • You want a map, with no extra functionality.

You can find detailed further information from Rust Official documentation:

https://doc.rust-lang.org/rust-by-example/std/hash.html 

Yorumlar

Yorum yapabilmek için derse kayıt olmalısın!