Trait specs::world::Builder [−][src]
pub trait Builder { fn with<C: Component + Send + Sync>(self, c: C) -> Self; fn build(self) -> Entity; }
A common trait for EntityBuilder
and LazyBuilder
, allowing either to be used.
Entity is definitely alive, but the components may or may not exist before a call to
World::maintain
.
Required Methods
fn with<C: Component + Send + Sync>(self, c: C) -> Self
Appends a component and associates it with the entity.
Panics
Panics if the component hasn't been register()
ed in the
World
.
fn build(self) -> Entity
Finishes the building and returns the entity.
Implementors
impl<'a> Builder for LazyBuilder<'a>
impl<'a> Builder for EntityBuilder<'a>