Struct plank_ecs::Entity[][src]

pub struct Entity(_, _);

An entity index. They are created using the Entities struct. They are used as indices with Components structs.

Entities are conceptual “things” which possess attributes (Components). As an exemple, a Car (Entity) has a Color (Component), a Position (Component) and a Speed (Component).

Implementations

impl Entity[src]

pub fn index(&self) -> u32[src]

Returns the index of this Entity.

In most cases, you do not want to use this directly. However, it can be useful to create caches to improve performances.

pub fn generation(&self) -> u32[src]

Returns the generation of this Entity.

In most cases, you do not want to use this directly. However, it can be useful to create caches to improve performances.

Trait Implementations

impl Clone for Entity[src]

impl Copy for Entity[src]

impl Debug for Entity[src]

impl Eq for Entity[src]

impl Hash for Entity[src]

impl PartialEq<Entity> for Entity[src]

impl StructuralEq for Entity[src]

impl StructuralPartialEq for Entity[src]

Auto Trait Implementations

impl RefUnwindSafe for Entity

impl Send for Entity

impl Sync for Entity

impl Unpin for Entity

impl UnwindSafe for Entity

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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.