pub struct Entities { /* private fields */ }Implementations§
Source§impl Entities
impl Entities
pub fn scene(&self) -> SceneId
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn spawn(&mut self) -> Entity
pub fn is_reserved(&self, entity: Entity) -> bool
Sourcepub fn despawn(&mut self, entity: Entity) -> Result<EntityKey, Rejection>
pub fn despawn(&mut self, entity: Entity) -> Result<EntityKey, Rejection>
A slot whose generation would wrap is retired instead of recycled.
pub fn resolve(&self, entity: Entity) -> Option<EntityKey>
pub fn snapshot(&self) -> EntitiesSnapshot
Sourcepub fn restore(&mut self, from: &EntitiesSnapshot)
pub fn restore(&mut self, from: &EntitiesSnapshot)
Advances the epoch; every handle from before the restore fails.
Auto Trait Implementations§
impl Freeze for Entities
impl RefUnwindSafe for Entities
impl Send for Entities
impl Sync for Entities
impl Unpin for Entities
impl UnsafeUnpin for Entities
impl UnwindSafe for Entities
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