Trait GenericReadStorage

Source
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

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.

Implementors§

Source§

impl<'a, 'b, T> GenericReadStorage for &'b Storage<'a, T, Fetch<'a, MaskedStorage<T>>>
where 'a: 'b, T: Component,

Source§

impl<'a, 'b, T> GenericReadStorage for &'b Storage<'a, T, FetchMut<'a, MaskedStorage<T>>>
where 'a: 'b, T: Component,

Source§

impl<'a, T> GenericReadStorage for Storage<'a, T, Fetch<'a, MaskedStorage<T>>>
where T: Component,

Source§

impl<'a, T> GenericReadStorage for Storage<'a, T, FetchMut<'a, MaskedStorage<T>>>
where T: Component,