pub struct EntityRef {
pub const_type: Type,
pub id: i32,
}Expand description
A resolved entity id (from loc.pack/npc.pack/stat.pack/etc.) and its type.
Entity IDs hugely outnumber every other symbol (~22k for a full corpus), so
they get this 8-byte Copy record instead of a 104-byte Symbol — entity
lookups only ever need the type and the id.
Fields§
§const_type: Type§id: i32Trait Implementations§
Auto Trait Implementations§
impl Forget for EntityRef
impl Freeze for EntityRef
impl RefUnwindSafe for EntityRef
impl Send for EntityRef
impl Sync for EntityRef
impl Unpin for EntityRef
impl UnsafeUnpin for EntityRef
impl UnwindSafe for EntityRef
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
Mutably borrows from an owned value. Read more