pub struct EntityId(/* private fields */);Expand description
Universal entity identifier used across all component storages.
Serialize/Deserialize provided by slotmap’s serde feature.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntityId
impl<'de> Deserialize<'de> for EntityId
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl From<EntityId> for ElevatorId
impl From<EntityId> for ElevatorId
Source§fn from(id: EntityId) -> Self
fn from(id: EntityId) -> Self
Wrap an EntityId in this typed newtype without verifying
the entity is actually of that kind. Wrong-type IDs surface
later as EntityNotFound / NotAnElevator from accessor
calls — for compile-time safety, prefer the typed
_id accessors on Simulation (elevator_ids,
rider_ids, etc.) that yield typed IDs directly. (#290)
Source§impl From<EntityId> for RiderId
impl From<EntityId> for RiderId
Source§fn from(id: EntityId) -> Self
fn from(id: EntityId) -> Self
Wrap an EntityId in this typed newtype without verifying
the entity is actually of that kind. Wrong-type IDs surface
later as EntityNotFound / NotAnElevator from accessor
calls — for compile-time safety, prefer the typed
_id accessors on Simulation (elevator_ids,
rider_ids, etc.) that yield typed IDs directly. (#290)
Source§impl Key for EntityId
impl Key for EntityId
Source§fn null() -> Self
fn null() -> Self
new_key_type!, which calls this
method). Read moreSource§impl Ord for EntityId
impl Ord for EntityId
Source§impl PartialOrd for EntityId
impl PartialOrd for EntityId
Source§impl WorldQuery for EntityId
impl WorldQuery for EntityId
impl Copy for EntityId
impl Eq for EntityId
impl StructuralPartialEq for EntityId
Auto Trait Implementations§
impl Freeze for EntityId
impl RefUnwindSafe for EntityId
impl Send for EntityId
impl Sync for EntityId
impl Unpin for EntityId
impl UnsafeUnpin for EntityId
impl UnwindSafe for EntityId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.