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
Trait Implementations§
source§impl Drop for ColumnBatchBuilder
impl Drop for ColumnBatchBuilder
impl Send for ColumnBatchBuilder
impl Sync for ColumnBatchBuilder
Auto Trait Implementations§
impl RefUnwindSafe for ColumnBatchBuilder
impl Unpin for ColumnBatchBuilder
impl UnwindSafe for ColumnBatchBuilder
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