map_vec
The Map and Set APIs backed by Vecs
map_vec::Map
is a data structure with the interface of HashMap
.
Similarly map_vec::Set
is a data structure with the interface of HashSet
.
Vector-backed maps and sets are primarily useful when you care about constant factors or prefer determinism to speed. Please refer to the docs for HashMap and HashSet for details on and examples of using the Map/Set API.
Optional features
Declare the map_vec
dependency with serde
support to get Serialize
and Deserialize
on Map
and Set
.
This requires a std
environment, though.
= { = "0.2", = ["serde"] }
Map Example
Set Example