Struct bevy::ecs::archetype::Archetype[]

pub struct Archetype { /* fields omitted */ }

Implementations

impl Archetype

pub fn new(
    id: ArchetypeId,
    table_id: TableId,
    table_components: Cow<'static, [ComponentId]>,
    sparse_set_components: Cow<'static, [ComponentId]>,
    table_archetype_components: Vec<ArchetypeComponentId, Global>,
    sparse_set_archetype_components: Vec<ArchetypeComponentId, Global>
) -> Archetype

pub fn id(&self) -> ArchetypeId

pub fn table_id(&self) -> TableId

pub fn entities(&self) -> &[Entity]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn entity_table_rows(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn table_components(&self) -> &[ComponentId]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn sparse_set_components(&self) -> &[ComponentId]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn unique_components(&self) -> &SparseSet<ComponentId, Column>

pub fn unique_components_mut(&mut self) -> &mut SparseSet<ComponentId, Column>

pub fn components(&self) -> impl Iterator<Item = ComponentId>

pub fn edges(&self) -> &Edges

pub fn entity_table_row(&self, index: usize) -> usize

pub fn set_entity_table_row(&mut self, index: usize, table_row: usize)

pub unsafe fn allocate(
    &mut self,
    entity: Entity,
    table_row: usize
) -> EntityLocation

Safety

valid component values must be immediately written to the relevant storages table_row must be valid

pub fn reserve(&mut self, additional: usize)

pub fn len(&self) -> usize

pub fn is_empty(&self) -> bool

pub fn contains(&self, component_id: ComponentId) -> bool

pub fn get_storage_type(&self, component_id: ComponentId) -> Option<StorageType>

pub fn get_archetype_component_id(
    &self,
    component_id: ComponentId
) -> Option<ArchetypeComponentId>

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,