pub trait AddEntity {
type Component;
// Required method
fn add_entity(
storage: &mut Self,
entity: EntityId,
component: Self::Component,
);
}
Expand description
Trait describing how to add a new entity to a storage.
Required Associated Types§
Required Methods§
sourcefn add_entity(storage: &mut Self, entity: EntityId, component: Self::Component)
fn add_entity(storage: &mut Self, entity: EntityId, component: Self::Component)
Adds a new entity with component
.
Object Safety§
This trait is not object safe.