Trait Builder
pub trait Builder {
// Required methods
fn with<C>(self, c: C) -> Self
where C: Component + Send + Sync;
fn build(self) -> Entity;
// Provided method
fn maybe_with<C>(self, c: Option<C>) -> Self
where C: Component + Send + Sync,
Self: Sized { ... }
}
Expand description
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§
Provided Methods§
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.