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<ElevatorId> for EntityId
impl From<ElevatorId> for EntityId
Source§fn from(id: ElevatorId) -> Self
fn from(id: ElevatorId) -> Self
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-kind IDs surface
later as EntityNotFound / NotAnElevator from accessor
calls. Equivalent to wrap_unchecked;
at host boundaries, prefer the verified
Simulation::elevator_id
/ Simulation::rider_id
accessors, which return Option after a runtime kind check.
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-kind IDs surface
later as EntityNotFound / NotAnElevator from accessor
calls. Equivalent to wrap_unchecked;
at host boundaries, prefer the verified
Simulation::elevator_id
/ Simulation::rider_id
accessors, which return Option after a runtime kind check.
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
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
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.