Expand description
vecmap-rs
A vector-based ordered map implementation with zero dependencies and support
for #![no_std].
Map keys are not required to be hashable and do not need to form a total order.
Therefore, VecMap<K, V> can be used with key types which neither implement
Hash nor Ord.
Since vecmap-rs is a Vec<(K, V)> under the hood, worst case lookup and
insertion performance is O(n) and scales with the number of map entries.
Thus, its main use case are small collections with unhashable keys.
For key types that implement Hash and Ord consider using a map implementation with better performance such as
HashMap and
BTreeMap from the standard library or popular alternatives like IndexMap.
Cargo features
The following features are available:
serde: ProvidesSerializeandDeserializeimplementations forVecMap. This feature is disabled by default. Enabling it will pull inserdeas a dependency.
License
The source code of vecmap-rs is licensed under either of Apache License, Version 2.0 or MIT license at your option.
Modules
VecMap is a vector-based map implementation which retains the order inserted entries.
Macros
Create an VecMap from a list of key-value pairs
Structs
A vector-based map implementation which retains the order of inserted entries.