pub struct World {
pub new_archetype_capacity: usize,
/* private fields */
}Fields§
§new_archetype_capacity: usizeImplementations§
source§impl World
impl World
pub fn with_new_archetype_capacity(self, value: usize) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn entities(&self) -> impl Iterator<Item = Entity> + '_
pub fn archetypes(&self) -> impl Iterator<Item = &Archetype>
pub fn clear(&mut self)
pub fn spawn(&mut self, bundle: impl Bundle) -> Result<Entity, WorldError>
sourcepub unsafe fn spawn_uninitialized<T: BundleColumns>(
&mut self,
) -> Result<(Entity, ArchetypeEntityRowAccess<'_>), WorldError>
pub unsafe fn spawn_uninitialized<T: BundleColumns>( &mut self, ) -> Result<(Entity, ArchetypeEntityRowAccess<'_>), WorldError>
§Safety
sourcepub unsafe fn spawn_uninitialized_raw(
&mut self,
columns: Vec<ArchetypeColumnInfo>,
) -> Result<(Entity, ArchetypeEntityRowAccess<'_>), WorldError>
pub unsafe fn spawn_uninitialized_raw( &mut self, columns: Vec<ArchetypeColumnInfo>, ) -> Result<(Entity, ArchetypeEntityRowAccess<'_>), WorldError>
§Safety
pub fn despawn(&mut self, entity: Entity) -> Result<(), WorldError>
pub fn insert( &mut self, entity: Entity, bundle: impl Bundle, ) -> Result<(), WorldError>
pub fn remove<T: BundleColumns>( &mut self, entity: Entity, ) -> Result<(), WorldError>
pub fn remove_raw( &mut self, entity: Entity, columns: Vec<ArchetypeColumnInfo>, ) -> Result<(), WorldError>
pub fn get<const LOCKING: bool, T: Component>( &self, entity: Entity, unique: bool, ) -> Result<ArchetypeEntityColumnAccess<'_, LOCKING, T>, WorldError>
pub fn dynamic_get<const LOCKING: bool>( &self, type_hash: TypeHash, entity: Entity, unique: bool, ) -> Result<ArchetypeDynamicEntityColumnAccess<'_, LOCKING>, WorldError>
pub fn query<'a, const LOCKING: bool, Fetch: TypedQueryFetch<'a, LOCKING>>( &'a self, ) -> TypedQueryIter<'a, LOCKING, Fetch> ⓘ
pub fn dynamic_query<'a, const LOCKING: bool>( &'a self, filter: &DynamicQueryFilter, ) -> DynamicQueryIter<'a, LOCKING> ⓘ
pub fn relate<T>(&mut self, from: Entity, to: Entity)
pub fn relate_raw(&mut self, type_hash: TypeHash, from: Entity, to: Entity)
pub fn unrelate<T>(&mut self, from: Entity, to: Entity)
pub fn unrelate_raw(&mut self, type_hash: TypeHash, from: Entity, to: Entity)
pub fn unrelate_from<T>(&mut self, from: Entity)
pub fn unrelate_from_raw(&mut self, type_hash: TypeHash, from: Entity)
pub fn unrelate_to<T>(&mut self, to: Entity)
pub fn unrelate_to_raw(&mut self, type_hash: TypeHash, to: Entity)
pub fn unrelate_all<T>(&mut self, entity: Entity)
pub fn unrelate_all_raw(&mut self, type_hash: TypeHash, entity: Entity)
pub fn unrelate_any(&mut self, entity: Entity)
pub fn relations<T>(&self, entity: Entity) -> impl Iterator<Item = Entity> + '_
pub fn relations_raw( &self, type_hash: TypeHash, entity: Entity, ) -> impl Iterator<Item = Entity> + '_
pub fn outgoing_relations<T>( &self, entity: Entity, ) -> impl Iterator<Item = Entity> + '_
pub fn outgoing_relations_raw( &self, type_hash: TypeHash, entity: Entity, ) -> impl Iterator<Item = Entity> + '_
pub fn incoming_relations<T>( &self, entity: Entity, ) -> impl Iterator<Item = Entity> + '_
pub fn incoming_relations_raw( &self, type_hash: TypeHash, entity: Entity, ) -> impl Iterator<Item = Entity> + '_
pub fn traverse_outgoing<T>( &self, entities: impl IntoIterator<Item = Entity>, ) -> RelationsTraverseIter<'_> ⓘ
pub fn traverse_outgoing_raw( &self, type_hash: TypeHash, entities: impl IntoIterator<Item = Entity>, ) -> RelationsTraverseIter<'_> ⓘ
pub fn traverse_incoming<T>( &self, entities: impl IntoIterator<Item = Entity>, ) -> RelationsTraverseIter<'_> ⓘ
pub fn traverse_incoming_raw( &self, type_hash: TypeHash, entities: impl IntoIterator<Item = Entity>, ) -> RelationsTraverseIter<'_> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for World
impl RefUnwindSafe for World
impl Send for World
impl Sync for World
impl Unpin for World
impl UnwindSafe for World
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