Add an entity_map module.

This supports the pattern of creating structs wrapping a u32 and using them as
indexes into a vector of entities. These entity references should implement the
EntityRef trait.

The EntityMap is a generic map from an EntityRef to some value type. It expects
densely indexed entities and uses a Vec to represent the mapping compactly.
This commit is contained in:
Jakob Stoklund Olesen
2016-07-15 15:14:16 -07:00
parent 2901198815
commit 191c607bf9
2 changed files with 132 additions and 0 deletions

View File

@@ -15,3 +15,5 @@ pub mod instructions;
pub mod repr;
pub mod write;
pub mod cfg;
pub mod entity_map;