Struct specs::EntityBuilder
[−]
[src]
pub struct EntityBuilder<'a> { /* fields omitted */ }
The entity builder, allowing to build an entity together with its components.
Methods
impl<'a> EntityBuilder<'a>
[src]
pub fn with<T: Component>(self, c: T) -> Self
[src]
Appends a component with the default component id.
Panics
Panics if the component hasn't been register()
ed in the
World
.
pub fn with_id<T: Component>(self, c: T, id: usize) -> Self
[src]
Appends a component with a component id.
Panics
Panics if the component hasn't been register_with_id()
ed in the
World
.
pub fn build(self) -> Entity
[src]
Finishes the building and returns the entity.