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
sourceimpl 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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more