[][src]Trait legion::world::Merger

pub trait Merger {
    fn merge_archetype(
        &mut self,
        src_entity_range: Range<usize>,
        src_arch: &Archetype,
        src_components: &Components,
        dst: &mut ArchetypeWriter<'_>
    ); fn prefers_new_archetype() -> bool { ... }
fn entity_map(&mut self) -> EntityRewrite { ... }
fn assign_id(
        &mut self,
        existing: Entity,
        allocator: &mut Allocate
    ) -> Entity { ... }
fn convert_layout(&mut self, source_layout: EntityLayout) -> EntityLayout { ... } }

Describes how to merge two worlds.

Required methods

fn merge_archetype(
    &mut self,
    src_entity_range: Range<usize>,
    src_arch: &Archetype,
    src_components: &Components,
    dst: &mut ArchetypeWriter<'_>
)

Merges an archetype from the source world into the destination world.

Loading content...

Provided methods

fn prefers_new_archetype() -> bool

Indicates if the merger prefers to merge into a new empty archetype.

fn entity_map(&mut self) -> EntityRewrite

Indicates how the merger wishes entity IDs to be adjusted while cloning a world.

fn assign_id(&mut self, existing: Entity, allocator: &mut Allocate) -> Entity

Returns the ID to use in the destination world when cloning the given entity.

fn convert_layout(&mut self, source_layout: EntityLayout) -> EntityLayout

Calculates the destination entity layout for the given source layout.

Loading content...

Implementors

impl Merger for Duplicate[src]

Loading content...