Creates a struct type
S that can be used as an index with
IndexVec and so on.
There are two ways of interacting with these indices:
Fromimpls are the preferred way. So you can do
u32. And you can convert back to an integer with
Alternatively, you can use the methods
s.index()to create/return a value.
Internally, the index uses a u32, so the index must not exceed
u32::MAX. You can also customize things like the
what traits are derived, and so forth via the macro.