[][src]Struct hecs::EntityRef

pub struct EntityRef<'a> { /* fields omitted */ }

Handle to an entity with any component types

Implementations

impl<'a> EntityRef<'a>[src]

pub fn get<T: Component>(&self) -> Option<Ref<'a, T>>[src]

Borrow the component of type T, if it exists

Panics if the component is already uniquely borrowed from another entity with the same components.

pub fn get_mut<T: Component>(&self) -> Option<RefMut<'a, T>>[src]

Uniquely borrow the component of type T, if it exists

Panics if the component is already borrowed from another entity with the same components.

Trait Implementations

impl<'a> Clone for EntityRef<'a>[src]

impl<'a> Copy for EntityRef<'a>[src]

impl<'a> Send for EntityRef<'a>[src]

impl<'a> Sync for EntityRef<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for EntityRef<'a>

impl<'a> Unpin for EntityRef<'a>

impl<'a> !UnwindSafe for EntityRef<'a>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.