Skip to main content

Module archetype

Module archetype 

Source
Expand description

Archetype storage.

An archetype owns all entities that have exactly the same set of component types, and stores one column per type. Rows of the different columns line up with Archetype::entities, so an entityโ€™s archetype and row are enough to find every component it has.

Archetypes are created on demand and never removed; an empty archetype costs one allocation.

Re-exportsยง

use core::any::Any; ๐Ÿ”’
use core::any::TypeId; ๐Ÿ”’
use hashbrown::HashMap; ๐Ÿ”’
use crate::column::AnyColumn; ๐Ÿ”’
use crate::column::Column; ๐Ÿ”’
use crate::entity::Entity; ๐Ÿ”’
use crate::error::ArchetypeAccessError; ๐Ÿ”’
use crate::world::World; ๐Ÿ”’

Structsยง

Archetype
One archetype: the entities that share a component set.
Archetypes
Every archetype of a world.

Enumsยง

ScopeSummary ๐Ÿ”’
Which scopes an archetypeโ€™s rows live in, as far as a whole-archetype gate can tell.