#[repr(transparent)]pub struct Entity { /* private fields */ }
Expand description
Represents an abstract Entity. Is internally a handle into the ECS to query it’s associated components.
Implementations
Constructs a new Entity from a raw u32. The higher/leftmost 24 bits as index, the lower/rightmost 8 bits are used as version.
Returns if entity is valid, meaning it is NOT equal to Entity::INVALID.
Manually construct a new Entity. index MUST be lower than 2^24! Failing to uphold this invariant will corrupt the internal handle.
Safety
- index MUST be lower than 2^24!
Sets the index part of the entity’s handle. index MUST be lower than 2^24! Failing to uphold this invariant will corrupt the internal handle.
Safety
- index MUST be lower than 2^24!
Sets the version part of the entity’s handle.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Entity
impl UnwindSafe for Entity
Blanket Implementations
Mutably borrows from an owned value. Read more