pub unsafe fn allocate(&mut self, entity: Entity) -> usize {
        self.reserve(1);
        let index = self.entities.len();
        self.entities.push(entity);
        for column in self.columns.values_mut() {
            column.data.set_len(self.entities.len());
            (*column.ticks.get()).push(ComponentTicks::new(0));
        }
        index
    }
/// Allocates space for a new entity
///
/// # Safety
/// the allocated row must be written to immediately with valid values in each column
Allocates space for a new entity
Allocates space for a new entity
pub unsafe fn allocate(&mut self, entity: Entity) -> usize {
        self.reserve(1);
        let index = self.entities.len();
        self.entities.push(entity);
        for column in self.columns.values_mut() {
            column.data.set_len(self.entities.len());
            (*column.ticks.get()).push(ComponentTicks::new(0));
        }
        index
    }
pub unsafe fn allocate ( & mut self , entity : Entity ) -> usize { self . reserve ( 1 ) ; let index = self . entities . len ( ) ; self . entities . push ( entity ) ; for column in self . columns . values_mut ( ) { column . data . set_len ( self . entities . len ( ) ) ; ( * column . ticks . get ( ) ) . push ( ComponentTicks :: new ( 0 ) ) ; } index }
Allocates space for a new entity
Allocates space for a new entity
&mut self
entity
Entity
&mut self
entity
Entity
safety
the allocated row must be written to immediately with valid values in each column
the allocated row must be written to immediately with valid values in each column