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 { ... } }
Expand description

Describes how to merge two Worlds.

Required methods

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

Provided methods

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

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

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

Calculates the destination entity layout for the given source layout.

Implementors