Type Alias mozjs::jsapi::RootedListHeads
source · pub type RootedListHeads = __BindgenOpaqueArray<u64, 15>;
Expand description
EnumeratedArray is a fixed-size array container for use when an array is indexed by a specific enum class.
This provides type safety by guarding at compile time against accidentally indexing such arrays with unrelated values. This also removes the need for manual casting when using a typed enum value to index arrays.
Aside from the typing of indices, EnumeratedArray is similar to Array.
Example:
enum class AnimalSpecies { Cow, Sheep, Count };
EnumeratedArray<AnimalSpecies, int, AnimalSpecies::Count> headCount;
headCount[AnimalSpecies::Cow] = 17; headCount[AnimalSpecies::Sheep] = 30;
If the enum class has contiguous values and provides a specialization of mozilla::MaxContiguousEnumValue then the size will be calculated as the max value + 1.
Aliased Type§
struct RootedListHeads(pub [u64; 15]);
Fields§
§0: [u64; 15]