Skip to main content

Module ids

Module ids 

Source
Expand description

Identifier newtypes.

InstanceId and EntityId wrap NonZeroU64 — zero is structurally unrepresentable, eliminating sentinel-value traps. Tick, TypeCode, RouteId wrap plain primitives because zero is a meaningful value for all three (origin tick; type/route zero is reserved for “unassigned” debug placeholders only and is not a sentinel).

Structs§

EntityId
Per-instance entity handle. Non-zero.
InstanceId
Instance namespace handle. Non-zero to reject sentinel usage at the type level.
RouteId
Stable dispatch identifier for an action route. Registry interns string names into RouteId at registration; kernel internal dispatch uses RouteId only (“string-free dispatch”).
Tick
Deterministic logical time. Monotonic non-decreasing across step() boundaries of an instance. Zero is the origin tick.
TypeCode
Stable dispatch identifier for a registered Action/Component/Event type. Assigned monotonically at register_module and bound to a schema_hash for the lifetime of the world (TypeCode cross-restart persistence).