pick
Returns a new map with only the entries of map whose key is in keys.
Keys that are not in map are ignored.
Import
Section titled “Import”Cargo feature map (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
map | &HashMap<K, V, S> | The map to filter. |
keys | &[K] | The keys to keep. |
Returns
Section titled “Returns”HashMap<K, V>
