pub struct NodeId(/* private fields */);
Expand description
Handle to an entity.
Implementations§
Source§impl EntityId
impl EntityId
Sourcepub fn index(self) -> u64
pub fn index(self) -> u64
Returns the index part of the EntityId
.
⚠️ You shouldn’t use it to index a storage.
Sourcepub fn uindex(self) -> usize
pub fn uindex(self) -> usize
Returns the index part of the EntityId
as an usize.
⚠️ You shouldn’t use it to index a storage.
Sourcepub const fn new_from_index_and_gen(index: u64, gen: u16) -> EntityId
pub const fn new_from_index_and_gen(index: u64, gen: u16) -> EntityId
Build a new EntityId
with the given index and generation.
Sourcepub fn from_inner(inner: u64) -> Option<EntityId>
pub fn from_inner(inner: u64) -> Option<EntityId>
Build an EntityId
from its inner representation.
Trait Implementations§
Source§impl Ord for EntityId
impl Ord for EntityId
Source§impl PartialOrd for EntityId
impl PartialOrd 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 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
Mutably borrows from an owned value. Read more