pub(crate) struct BundleComponent {
pub(crate) type_id: TypeId,
pub(crate) name: &'static str,
pub(crate) column: fn() -> Box<dyn AnyColumn>,
pub(crate) value: Box<dyn Any>,
}Expand description
One component of a bundle: its type, the name and column constructor the world registers it under, and the value box the archetype takes.
The type-keyed facts sit in one entry rather than in parallel arrays, so a component’s type is written once and the arrays cannot fall out of step when they are sorted.
Fields§
§type_id: TypeId§name: &'static str§column: fn() -> Box<dyn AnyColumn>§value: Box<dyn Any>Auto Trait Implementations§
impl !RefUnwindSafe for BundleComponent
impl !Send for BundleComponent
impl !Sync for BundleComponent
impl !UnwindSafe for BundleComponent
impl Forget for BundleComponent
impl Freeze for BundleComponent
impl Unpin for BundleComponent
impl UnsafeUnpin for BundleComponent
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