entity_kit v0.4.1 Manganese.EntityKit.Structs.EntitiesCollection
Link to this section Summary
Functions
Retrieve an entity from the collection.
Combine two collections into one.
Create an empty entities collection.
Add multiple entities of the same type to the collection.
Add an entity to the collection.
Link to this section Types
Link to this section Functions
get_entity(entities_collection, entity_type, id)
get_entity(t(), atom(), pos_integer()) :: term() | nil
Retrieve an entity from the collection.
If no entity of the given type and ID pair exist, nil
is returned instead.
Combine two collections into one.
If an entity of the same type and ID pair is present in both collections, the value in entities_collection2
will take precedence.
Create an empty entities collection.
put_entities(entities_collection, entity_type, entities)
Add multiple entities of the same type to the collection.
If an entity of the given type and ID pair already exist, it will be overwritten with the new value.
put_entity(entities_collection, entity_type, entity)
Add an entity to the collection.
If the entity of the given type and ID pair already exist, it will be overwritten with the new value.