pub struct ComponentStore { /* private fields */ }
Expand description

The ComponentStore stores the components of entities and uses strings as component keys. It could be used to borrow the components of the entities.

Implementations

Appends the given components to the entity.

Removes and entity from the store.

Print infos about the given entity.

Returns a list of entities that references the same component.

Register a component for the given entity.

Registers a sharing of the given component between the given entities. Uses as source key the component key.

Registers a sharing of the given component between the given entities.

Registers a sharing of the given component between the given entities. Uses as source key the component key.

Registers a sharing of the given component between the given entities.

Register a component_box for the given entity.

Returns the number of components in the store.

Returns true if the components are empty.

Returns true if the store contains the specific entity.

Returns true if entity is the origin of the requested component false.

Returns the target key for a given source and target.

Returns the source. First search in entities map. If not found search in shared entity map.

Check if the given component has the given type.

Returns a reference of a component of type C from the given entity. If the entity does not exists or it doesn’t have a component of type C NotFound will be returned.

Returns a mutable reference of a component of type C from the given entity. If the entity does not exists or it doesn’t have a component of type C NotFound will be returned.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.