pub struct Entities<'a>(/* private fields */);Implementations§
Source§impl<'a> Entities<'a>
impl<'a> Entities<'a>
Sourcepub fn delete(&self, e: Entity) -> Result<(), WrongGeneration>
pub fn delete(&self, e: Entity) -> Result<(), WrongGeneration>
Atomically request that this entity be removed on the next call to World::merge_atomic.
An entity is not deleted until World::merge_atomic is called, so it will still be ‘alive’
and show up in queries until that time.
pub fn is_alive(&self, e: Entity) -> bool
pub fn entity(&self, index: Index) -> Option<Entity>
Sourcepub fn create(&self) -> Entity
pub fn create(&self) -> Entity
Atomically allocate an entity. An atomically allocated entity is indistinguishable from a
regular live entity, but when World::merge_atomic is called it will be merged into a
non-atomic BitSet for performance.
pub fn live_bitset(&self) -> LiveBitSet<'_>
Trait Implementations§
Source§impl<'a> FetchResources<'a> for Entities<'a>
impl<'a> FetchResources<'a> for Entities<'a>
type Source = World
type Resources = RwResources<WorldResourceId>
fn check_resources() -> Result<RwResources<WorldResourceId>, ResourceConflict>
fn fetch(world: &'a World) -> Self
Auto Trait Implementations§
impl<'a> Freeze for Entities<'a>
impl<'a> RefUnwindSafe for Entities<'a>
impl<'a> Send for Entities<'a>
impl<'a> Sync for Entities<'a>
impl<'a> Unpin for Entities<'a>
impl<'a> UnsafeUnpin for Entities<'a>
impl<'a> UnwindSafe for Entities<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more