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
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.