Expand description
This module provides functionality to link entities to each other using specialized components called “relationships”. See the Relationship trait for more info.
Structs§
- Ancestor
Iter - An
IteratorofEntitys over the ancestors of anEntity. - Descendant
Depth First Iter - An
IteratorofEntitys over the descendants of anEntity. - Descendant
Iter - An
IteratorofEntitys over the descendants of anEntity. - Related
Spawner - Directly spawns related “source” entities with the given
Relationship, targeting a specific entity. - Related
Spawner Commands - Uses commands to spawn related “source” entities with the given
Relationship, targeting a specific entity.
Enums§
- Relationship
Hook Mode - Configures the conditions under which the Relationship insert/replace hooks will be run.
Traits§
- Ordered
Relationship Source Collection - This trait signals that a
RelationshipSourceCollectionis ordered. - Relationship
- A
Componenton a “source”Entitythat references another targetEntity, creating a “relationship” between them. EveryRelationshiphas a correspondingRelationshipTargettype (and vice-versa), which exists on the “target” entity of a relationship and contains the list of all “source” entities that relate to the given “target” - Relationship
Source Collection - The internal
Entitycollection used by aRelationshipTargetcomponent. This is not intended to be modified directly by users, as it could invalidate the correctness of relationships. - Relationship
Target - A
Componentcontaining the collection of entities that relate to thisEntityvia the associatedRelationshiptype. See theRelationshipdocumentation for more information.
Functions§
- clone_
relationship_ target - The “clone behavior” for
RelationshipTarget. TheRelationshipTargetwill be populated with the proper components when the correspondingRelationshipsources of truth are inserted. Cloning the actual entities in the originalRelationshipTargetwould result in duplicates, so we don’t do that!
Type Aliases§
- Source
Iter - The iterator type for the source entities in a
RelationshipTargetcollection, as defined in theRelationshipSourceCollectiontrait.