[−][src]Trait legion::world::Merger
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<'_>
)
&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.
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.
Implementors
impl Merger for Duplicate
[src]
fn convert_layout(&mut self, source_layout: EntityLayout) -> EntityLayout
[src]
fn merge_archetype(
&mut self,
src_entity_range: Range<usize>,
src_arch: &Archetype,
src_components: &Components,
dst: &mut ArchetypeWriter<'_>
)
[src]
&mut self,
src_entity_range: Range<usize>,
src_arch: &Archetype,
src_components: &Components,
dst: &mut ArchetypeWriter<'_>
)