logo
pub trait ComponentTrait: Debug {
    fn get_type() -> ComponentType;
    fn from_entity(handle: Entity) -> Self;
    fn entity(&self) -> Entity;
}
Expand description

Common interface that components expose.

Required Methods

The type of the component, as a ComponentType enum.

Adopt an Entity, wrap in a component struct.

Get the entity that the component belongs to.

Implementors