ComponentsStorage

Trait ComponentsStorage 

Source
pub trait ComponentsStorage<'a, R: Components> {
    type Storage: Cons;

    // Required method
    fn components(registry: &'a R) -> Self::Storage;
}
Expand description

Trait for getting archetype component storages.

Required Associated Types§

Source

type Storage: Cons

Cons of storage types.

Required Methods§

Source

fn components(registry: &'a R) -> Self::Storage

Gets the storage represented by self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, R: Components, E: Entity + Any> ComponentsStorage<'a, R> for (E, ())

Source§

type Storage = ()

Source§

fn components(_registry: &'a R) -> Self::Storage

Source§

impl<'a, R: Components, E: Entity + Any, C: Component<E> + Any, Tail: Cons> ComponentsStorage<'a, R> for (E, (&'a C, Tail))

Source§

type Storage = (Ref<'a, <C as Component<E>>::Storage>, <(E, Tail) as ComponentsStorage<'a, R>>::Storage)

Source§

fn components(registry: &'a R) -> Self::Storage

Source§

impl<'a, R: Components, E: Entity + Any, C: Component<E> + Any, Tail: Cons> ComponentsStorage<'a, R> for (E, (&'a mut C, Tail))

Source§

type Storage = (RefMut<'a, <C as Component<E>>::Storage>, <(E, Tail) as ComponentsStorage<'a, R>>::Storage)

Source§

fn components(registry: &'a R) -> Self::Storage

Implementors§