Struct calx_ecs::ComponentData [] [src]

pub struct ComponentData<C> { /* fields omitted */ }

Storage for a single component type.

Methods

impl<C> ComponentData<C>
[src]

Construct new empty ComponentData instance.

Insert a component to an entity.

Return whether an entity contains this component.

Get a reference to a component only if it exists for this entity.

Get a mutable reference to a component only if it exists for this entity.

Iterate entity ids in this component.

Iterate elements in this component.

Iterate mutable elements in this component.

Trait Implementations

impl<C> Index<Entity> for ComponentData<C>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<C> IndexMut<Entity> for ComponentData<C>
[src]

The method for the mutable indexing (container[index]) operation

impl<C> AnyComponent for ComponentData<C>
[src]

Remove an entity's component.

impl<C: Serialize + Clone> Serialize for ComponentData<C>
[src]

Serialize this value into the given Serde serializer. Read more

impl<'a, C: Deserialize<'a>> Deserialize<'a> for ComponentData<C>
[src]

Deserialize this value from the given Serde deserializer. Read more