Struct shipyard::EntityId[][src]

#[repr(transparent)]pub struct EntityId(_);

Handle to an entity.

Implementations

impl EntityId[src]

pub fn from_index_and_gen(index: u64, gen: u32) -> EntityId[src]

This is supported on crate feature serde1 only.

Make an EntityId from an index and generation.

impl EntityId[src]

pub fn index(self) -> u64[src]

Returns the index part of the EntityId.
⚠️ You shouldn’t use it to index a storage.

pub fn uindex(self) -> usize[src]

Returns the index part of the EntityId as an usize.
⚠️ You shouldn’t use it to index a storage.

pub fn gen(self) -> u64[src]

Returns the generation part of the EntityId.

pub fn dead() -> Self[src]

Returns a dead EntityId, it can be used as a null entity.

pub fn inner(self) -> u64[src]

Returns EntityId’s inner representation.

pub fn from_inner(inner: u64) -> Option<EntityId>[src]

Build an EntityId from its inner representation.

Trait Implementations

impl Clone for EntityId[src]

impl Copy for EntityId[src]

impl Debug for EntityId[src]

impl<'de> Deserialize<'de> for EntityId[src]

impl Eq for EntityId[src]

impl Hash for EntityId[src]

impl<T> Index<EntityId> for SparseSet<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<EntityId> for SparseSet<T>[src]

impl Ord for EntityId[src]

impl PartialEq<EntityId> for EntityId[src]

impl PartialOrd<EntityId> for EntityId[src]

impl Serialize for EntityId[src]

impl StructuralEq for EntityId[src]

Auto Trait Implementations

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> CallHasher for T where
    T: Hash

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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.