Struct hecs::ColumnBatchBuilder
source · pub struct ColumnBatchBuilder { /* private fields */ }
Expand description
An incomplete collection of component data for entities with the same component types
Implementations§
source§impl ColumnBatchBuilder
impl ColumnBatchBuilder
sourcepub fn new(ty: ColumnBatchType, size: u32) -> Self
pub fn new(ty: ColumnBatchType, size: u32) -> Self
Create a batch for exactly size
entities with certain component types
sourcepub fn writer<T: Component>(&mut self) -> Option<BatchWriter<'_, T>>
pub fn writer<T: Component>(&mut self) -> Option<BatchWriter<'_, T>>
Get a handle for inserting T
components if T
was in the ColumnBatchType
sourcepub fn build(self) -> Result<ColumnBatch, BatchIncomplete>
pub fn build(self) -> Result<ColumnBatch, BatchIncomplete>
Finish the batch, failing if any components are missing