collections::map
Keys need Eq and Hash. For keys in sorted order, use TreeMap.
Part of coil-stdlib. spool projects get it automatically; with plain coil, pass --root ~/.coil/stdlib/src.
Import what you use (use path::* is not allowed):
use collections::map::{Entry, HashMap};
Types#
| Name | Description |
|---|---|
Entry | One key-value pair, as HashMap iteration yields it. |
HashMap | A hash map from keys of type K to values of type V. |
HashMapIter | An iterator over the entries of a HashMap, from HashMap::iter. |