#map #enums #fixed-size

no-std power_map

A map with finite key and fixed size

1 unstable release

0.1.0 Apr 30, 2024

#1064 in Data structures

Download history 150/week @ 2024-04-29

150 downloads per month

MIT/Apache

57KB
1K SLoC

提供无堆分配、静态大小的 TotalMap,类似 EnumMap

此库是 no_std 的,且没有不安全代码。


lib.rs:

为有限的定义域提供大小固定的映射

TotalMap 提供了类似 EnumMap 的单射。

作为键者需实现 MapKey,可使用 GenericMapKey 自动实现。

Dependencies

~325–780KB
~19K SLoC