[][src]Struct conniecs::component::ComponentList

pub struct ComponentList<C, T> where
    C: ComponentManager,
    T: Component
{ /* fields omitted */ }

Methods

impl<C, T> ComponentList<C, T> where
    C: ComponentManager,
    T: Component
[src]

pub fn hot() -> Self[src]

pub fn cold() -> Self[src]

pub fn add(&mut self, entity: BuildData<C>, component: T) -> Option<T>[src]

pub fn remove(&mut self, entity: ModifyData<C>) -> Option<T>[src]

pub fn set<E>(&mut self, entity: E, component: T) -> Option<T> where
    E: EditData<C>, 
[src]

pub fn get<E>(&self, entity: E) -> Option<T> where
    E: EditData<C>,
    T: Clone
[src]

pub fn has<E>(&self, entity: E) -> bool where
    E: EditData<C>, 
[src]

pub fn borrow<E>(&mut self, entity: E) -> Option<&mut T> where
    E: EditData<C>, 
[src]

Trait Implementations

impl<C, T, E> Index<E> for ComponentList<C, T> where
    C: ComponentManager,
    T: Component,
    E: EditData<C>, 
[src]

type Output = T

The returned type after indexing.

impl<C, T, E> IndexMut<E> for ComponentList<C, T> where
    C: ComponentManager,
    T: Component,
    E: EditData<C>, 
[src]

impl<C: Debug, T: Debug> Debug for ComponentList<C, T> where
    C: ComponentManager,
    T: Component
[src]

Auto Trait Implementations

impl<C, T> Send for ComponentList<C, T> where
    C: Send,
    T: Send

impl<C, T> Sync for ComponentList<C, T> where
    C: Sync,
    T: Sync

Blanket Implementations

impl<T> Component for T where
    T: 'static, 
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.