entity-trait-system-0.1.0 has been yanked.
Entity Trait System
Entity trait system (ETS) is an alternative to entity component system architectures.
Here is a video summary.
Optional features:
Requires the nightly compiler and specialization feature - it's only used in a sound way.
Example
// explicitly opt in to language feature
// declare world, entities, and traits which the entities could have
world!;
let mut world = default;
// directly access arena member
let player_id = world.player.insert;
// compile time type accessor of arena member
world..insert;
// visit all arena with types that implement trait - bound at compile time
world.par_visit_test_trait;
world.visit_test_trait;
// runtime type API - access object without knowing the type beforehand
let arena_id = ;
let arena = world.arena_erased;
// unwrap: I know that this is a player and that the reference is valid
let player = arena
.get_any
.unwrap
.
.unwrap;
player.do_something;