Skip to main content

Bundle

Trait Bundle 

Source
pub trait Bundle:
    'static
    + Send
    + Sync {
    // Required methods
    fn type_ids() -> Vec<TypeId>;
    fn register_columns(arch: &mut Archetype);
    fn insert_into(self, arch: &mut Archetype, tick: u32);
}
Expand description

A heterogeneous set of components spawned together.

Required Methods§

Source

fn type_ids() -> Vec<TypeId>

Sorted TypeIds of all components.

Source

fn register_columns(arch: &mut Archetype)

Ensure all columns exist on arch.

Source

fn insert_into(self, arch: &mut Archetype, tick: u32)

Push all components into arch.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<A: Component, B: Component, C: Component, D: Component, E: Component, F: Component, G: Component, H: Component> Bundle for (A, B, C, D, E, F, G, H)

Source§

impl<A: Component, B: Component, C: Component, D: Component, E: Component, F: Component, G: Component> Bundle for (A, B, C, D, E, F, G)

Source§

impl<A: Component, B: Component, C: Component, D: Component, E: Component, F: Component> Bundle for (A, B, C, D, E, F)

Source§

impl<A: Component, B: Component, C: Component, D: Component, E: Component> Bundle for (A, B, C, D, E)

Source§

impl<A: Component, B: Component, C: Component, D: Component> Bundle for (A, B, C, D)

Source§

impl<A: Component, B: Component, C: Component> Bundle for (A, B, C)

Source§

impl<A: Component, B: Component> Bundle for (A, B)

Implementors§

Source§

impl<C: Component> Bundle for C