entity_key.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.2/entity_key.bend as Entity_key
1 import
import Base
Types
type Key source · line 6 · raw
Data
Detached entity slot index and generation. This key has no world namespace or liveness proof; use a World.Handle and checked operations for authority. Generation wrap follows the allocator contract, not eternal key uniqueness.
EntityKey@index:U32 -> @generation:U32 -> Key
Definitions
def index source · line 11 · raw
@key:Key -> U32
Return only the slot index, discarding generation for this observation. Equal indices do not establish equal entity identities or valid handles.
def generation source · line 16 · raw
@key:Key -> U32
Return the stored generation without validating a live entity or world.
def equal source · line 22 · raw
@left:Key -> @right:Key -> Bool
Compare both slot index and generation. Does not compare world namespaces or establish liveness; World handle validation remains required.