pub struct Entity { /* private fields */ }Expand description
A handle to an entity, valid only while its generation matches.
Copy and 64 bits, so passing one costs nothing and storing a million
costs 8 MB. Deliberately not Default: a zeroed handle would name
slot 0 at generation 0, which is a real entity, and a defaulted handle
that accidentally works is worse than one that will not compile.
Implementations§
Trait Implementations§
impl Copy for Entity
impl Eq for Entity
Source§impl Ord for Entity
impl Ord for Entity
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Entity
impl PartialOrd for Entity
impl StructuralPartialEq for Entity
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnsafeUnpin for Entity
impl UnwindSafe for Entity
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