Rust by Example: Collections - Hash Maps
|
|
|
|
|
|
Create a new hashmap with |
|
Create a hashmap with initial key-value pairs using |
|
Insert key-value pairs into the |
|
Insert a key-value pair only if the key is not present. |
|
Retrieve the value associated with a key, in combination with |
|
Retrieve the value associated with a key, in combination with |
|
Updating a value in the |
|
Updating a value based on the old value. |
|
Removing a key-value pair |
|
Removing a key-value pair and getting the value, in combination with
|
|
Removing a key-value pair and getting the value, in combination with
|
|
Check if a key exist |
|
Check if a key exists, in combination with |
|
Iterate over the key-value pairs |
|
Iterate over the key-value pairs and modify the value |
|
Iterate over just the keys |
|
Iterate over just the values |
|
Check the number of elements in the |
|
Check if the |
|
Clear all key-value pairs |
|
|