Struct specs_static::Storage [] [src]

pub struct Storage<C, D: UnprotectedStorage<C>, I> { /* fields omitted */ }

A storage for components managed with specs_static::Id instead of Entity. This Storage behaves very similar to specs' Storage.

Registering

These component storages also have to be registered. This can be done using the WorldExt trait and its register_tile_comp method.

Methods

impl<C, D, I> Storage<C, D, I> where
    C: Component,
    D: UnprotectedStorage<C>,
    I: Id
[src]

[src]

Tries to retrieve a component by its Id. This will only check whether a component is inserted or not, without doing any liveness checks for the id.

[src]

Tries to retrieve a component mutably by its Id. This will only check whether a component is inserted or not, without doing any liveness checks for the id.

[src]

Inserts comp at id. If there already was a value, it will be returned.

In contrast to entities, there are no invalid ids.

[src]

Removes the component at id.

Trait Implementations

impl<C, D: UnprotectedStorage<C>, I> Default for Storage<C, D, I> where
    D: Default
[src]

[src]

Returns the "default value" for a type. Read more

impl<C, D, I> Drop for Storage<C, D, I> where
    D: UnprotectedStorage<C>, 
[src]

[src]

Executes the destructor for this type. Read more

impl<'a, C, D, I> Join for &'a Storage<C, D, I> where
    D: UnprotectedStorage<C>, 
[src]

Type of joined components.

Type of joined storages.

Type of joined bit mask.

[src]

Open this join by returning the mask and the storages.

[src]

Get a joined component value by a given index.

[src]

Create a joined iterator over the contents.

impl<'a, C, D, I> Join for &'a mut Storage<C, D, I> where
    D: UnprotectedStorage<C>, 
[src]

Type of joined components.

Type of joined storages.

Type of joined bit mask.

[src]

Open this join by returning the mask and the storages.

[src]

Get a joined component value by a given index.

[src]

Create a joined iterator over the contents.

Auto Trait Implementations

impl<C, D, I> Send for Storage<C, D, I> where
    C: Send,
    D: Send,
    I: Send

impl<C, D, I> Sync for Storage<C, D, I> where
    C: Sync,
    D: Sync,
    I: Sync