pub trait GenericReadStorage {
    type Component: Component;

    // Required methods
    fn get(&self, entity: Entity) -> Option<&Self::Component>;
    fn _private() -> Seal;
}
Expand description

Provides generic read access to both ReadStorage and WriteStorage

Required Associated Types§

source

type Component: Component

The component type of the storage

Required Methods§

source

fn get(&self, entity: Entity) -> Option<&Self::Component>

Get immutable access to an Entitys component

source

fn _private() -> Seal

Private function to seal the trait

Implementors§

source§

impl<'a, T> GenericReadStorage for ReadStorage<'a, T>where T: Component,

§

type Component = T

source§

impl<'a, T> GenericReadStorage for WriteStorage<'a, T>where T: Component,

§

type Component = T

source§

impl<'a: 'b, 'b, T> GenericReadStorage for &'b ReadStorage<'a, T>where T: Component,

§

type Component = T

source§

impl<'a: 'b, 'b, T> GenericReadStorage for &'b WriteStorage<'a, T>where T: Component,

§

type Component = T