pub struct Archetype { /* private fields */ }Implementations§
Source§impl Archetype
impl Archetype
pub fn new( columns: Vec<ArchetypeColumnInfo>, capacity: usize, ) -> Result<Self, ArchetypeError>
pub fn view<B: BundleColumns>(&self) -> Option<ArchetypeView>
pub fn view_raw(&self, columns: &[ArchetypeColumnInfo]) -> Option<ArchetypeView>
pub fn view_all(&self) -> ArchetypeView
pub fn validate_sdir(&self) -> Result<(), ArchetypeError>
pub fn is_column_sdir_locked_raw(&self, type_hash: TypeHash) -> bool
pub fn is_column_sdir_locked<T: Component>(&self) -> bool
pub fn capacity(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn entities(&self) -> &EntityDenseMap
pub fn columns(&self) -> impl Iterator<Item = &ArchetypeColumnInfo>
pub fn has_column(&self, column: &ArchetypeColumnInfo) -> bool
pub fn has_columns(&self, columns: &[ArchetypeColumnInfo]) -> bool
pub fn has_columns_exact(&self, columns: &[ArchetypeColumnInfo]) -> bool
pub fn has_any_columns(&self, columns: &[ArchetypeColumnInfo]) -> bool
pub fn has_no_columns(&self, columns: &[ArchetypeColumnInfo]) -> bool
pub fn has_type(&self, type_hash: TypeHash) -> bool
pub fn has_types(&self, types: &[TypeHash]) -> bool
pub fn has_types_exact(&self, types: &[TypeHash]) -> bool
pub fn has_no_types(&self, types: &[TypeHash]) -> bool
pub fn clear<const LOCKING: bool>(&mut self) -> Result<(), ArchetypeError>
pub fn insert( &mut self, entity: Entity, bundle: impl Bundle, ) -> Result<(), ArchetypeError>
pub fn add( &mut self, entity: Entity, ) -> Result<ArchetypeEntityRowAccess<'_>, ArchetypeError>
pub fn remove(&mut self, entity: Entity) -> Result<(), ArchetypeError>
Sourcepub unsafe fn remove_uninitialized(
&mut self,
entity: Entity,
) -> Result<(), ArchetypeError>
pub unsafe fn remove_uninitialized( &mut self, entity: Entity, ) -> Result<(), ArchetypeError>
§Safety
pub fn transfer<'a>( &mut self, other: &'a mut Self, entity: Entity, ) -> Result<ArchetypeEntityRowAccess<'a>, ArchetypeError>
pub fn column<const LOCKING: bool, T: Component>( &self, unique: bool, ) -> Result<ArchetypeColumnAccess<'_, LOCKING, T>, ArchetypeError>
pub fn dynamic_column<const LOCKING: bool>( &self, type_hash: TypeHash, unique: bool, ) -> Result<ArchetypeDynamicColumnAccess<'_, LOCKING>, ArchetypeError>
pub fn entity<const LOCKING: bool, T: Component>( &self, entity: Entity, unique: bool, ) -> Result<ArchetypeEntityColumnAccess<'_, LOCKING, T>, ArchetypeError>
pub fn dynamic_entity<const LOCKING: bool>( &self, type_hash: TypeHash, entity: Entity, unique: bool, ) -> Result<ArchetypeDynamicEntityColumnAccess<'_, LOCKING>, ArchetypeError>
pub fn row<const LOCKING: bool>( &self, entity: Entity, ) -> Result<ArchetypeEntityRowAccess<'_>, ArchetypeError>
pub fn column_read_iter<const LOCKING: bool, T: Component>( &self, ) -> Result<ArchetypeColumnReadIter<'_, T>, ArchetypeError>
pub fn column_write_iter<const LOCKING: bool, T: Component>( &self, ) -> Result<ArchetypeColumnWriteIter<'_, LOCKING, T>, ArchetypeError>
pub fn dynamic_column_iter<const LOCKING: bool>( &self, type_hash: TypeHash, unique: bool, ) -> Result<ArchetypeDynamicColumnIter<'_, LOCKING>, ArchetypeError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Archetype
impl RefUnwindSafe for Archetype
impl Send for Archetype
impl Sync for Archetype
impl Unpin for Archetype
impl UnwindSafe for Archetype
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