pub struct EntityResBuilder<'a> {
pub entity: Entity,
pub entities: &'a EntitiesRes,
/* private fields */
}Expand description
An entity builder from EntitiesRes. Allows building an entity with its
components if you have mutable access to the component storages.
Fields§
§entity: EntityThe entity being built
entities: &'a EntitiesResThe active borrow to EntitiesRes, used to delete the entity if the
builder is dropped without called build().
Implementations§
Source§impl<'a> EntityResBuilder<'a>
impl<'a> EntityResBuilder<'a>
Sourcepub fn with<T>(
self,
c: T,
storage: &mut Storage<'_, T, FetchMut<'_, MaskedStorage<T>>>,
) -> EntityResBuilder<'a>where
T: Component,
pub fn with<T>(
self,
c: T,
storage: &mut Storage<'_, T, FetchMut<'_, MaskedStorage<T>>>,
) -> EntityResBuilder<'a>where
T: Component,
Appends a component and associates it with the entity.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for EntityResBuilder<'a>
impl<'a> RefUnwindSafe for EntityResBuilder<'a>
impl<'a> Send for EntityResBuilder<'a>
impl<'a> Sync for EntityResBuilder<'a>
impl<'a> Unpin for EntityResBuilder<'a>
impl<'a> UnwindSafe for EntityResBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more