Struct intuicio_framework_ecs::world::World
source · 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> ⓘ
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