3 ms·
You could use TiVec[1], TiSlice[1] or TiBitset[2] (shameless plug) to have datastructures indexed by the type you need, all checked at compile type. All you n
by bestouff 5y ago
You could use TiVec[1], TiSlice[1] or TiBitset[2] (shameless plug) to have datastructures indexed by the type you need, all checked at compile type.
All you need is a From/Into implementation for your chosen index type.
1: https://lib.rs/crates/typed-index-collections https://lib.rs/crates/typed-index-collections
2: https://lib.rs/crates/tibitset https://lib.rs/crates/tibitset