Struct dces::prelude::ComponentBuilder
source · [−]pub struct ComponentBuilder { /* private fields */ }
Expand description
The ComponentBuilder
is used to build a set of string key based components.
Implementations
sourceimpl ComponentBuilder
impl ComponentBuilder
sourcepub fn with<C: Component>(self, key: &str, component: C) -> Self
pub fn with<C: Component>(self, key: &str, component: C) -> Self
Adds a component of type C
to the entity.
Adds an entity as source
for a shared component of type C
.
Adds an entity as source
for a shared component of type C
.
sourcepub fn build(self) -> (BuildComponents, BuildSharedComponents)
pub fn build(self) -> (BuildComponents, BuildSharedComponents)
Finishing the creation of the entity.
Trait Implementations
sourceimpl Default for ComponentBuilder
impl Default for ComponentBuilder
sourcefn default() -> ComponentBuilder
fn default() -> ComponentBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ComponentBuilder
impl !Send for ComponentBuilder
impl !Sync for ComponentBuilder
impl Unpin for ComponentBuilder
impl !UnwindSafe for ComponentBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more