entity_kit v0.3.0 Manganese.EntityKit.Structs.EntityReferencesCollection

Link to this section Summary

Link to this section Types

Link to this type

t()

t() :: %Manganese.EntityKit.Structs.EntityReferencesCollection{
  entity_ids: %{optional(atom()) => [Manganese.EntityKit.Behaviors.Entity.id()]}
}

Link to this section Functions

Link to this function

filter(entity_references_collection, filter)

Link to this function

has_entity?(entity_references_collection, entity_type, id)

has_entity?(t(), atom(), pos_integer()) :: t()

Check if an entity of the given type and ID are referenced in the collection.

Link to this function

merge(entity_references_collection1, entity_references_collection2)

merge(t(), t()) :: t()
Link to this function

new()

new() :: t()
Link to this function

put_entity_id(entity_references_collection, entity_type, id)

put_entity_id(t(), atom(), pos_integer()) :: t()

Add an entity reference to the collection.

Link to this function

put_entity_ids(entity_references_collection, entity_type, ids)

put_entity_ids(t(), atom(), [pos_integer()]) :: t()

Add multiple entity references to the collection.

Link to this function

to_map(entity_references_collection)

to_map(t()) :: map()