Trait codegen::OptionalComponent [−][src]
pub trait OptionalComponent<T>: Sized { }
Expand description
A marker trait for standard archetypes.
If A: OptionalComponent<B>
,
this means that all entities with B
should also have A
.
This dependency is not enforced anywhere.
It merely serves for documentation purpose.
This is used to annotate the standard component set of an entity,
using the identification type as B
.
e.g. all optional components for nodes implement OptionalComponent<node::Id>
.