~/bend-docscommunity

world.bend checks

raw source on the hub · import 0x67fd5084c1da4adc13317822045bb11f/world.bend as World

8 imports
import Base
import ./change_tick.bend as Tick
import ./clock_state.bend as Clock
import ./trace_facts.bend as TraceFacts
import ./deferred_command.bend as Deferred
import string_equality.bend as SE
import entity_key.bend as K
import entity_allocator.bend as A

Types

type Handle source · line 14 · raw

@Schema:Data -> Data

Framework-owned metadata. Independent factory roots are not globally unique. Schema-branded detached identity containing World namespace and full entity key (index plus generation). Extracting its index does not validate it; raw construction is trusted setup, not evidence that a handle belongs to a live entity.

type Factory source · line 19 · raw

Type

Affine namespace sequence for raw World creation. Keep one actual sequence for worlds that must distinguish each other; independently reset roots can collide. Application code normally uses world-io creation rather than fabricating this value.

type RegistrationMeta source · line 23 · raw

Data

Detached registration id/name/ordered access metadata. It is not the registered runner, its affine Local/capture owner or a capability derived from a string.

type WorldError source · line 27 · raw

Data

Explicit low-level refusal reasons for entity, capacity, namespace or system-id admission. Callers must inspect their operation result rather than infer success.

type World source · line 35 · raw

@Schema:Data -> @Store:Type -> @Resource:Type -> @Event:Data -> Type

Affine engine storage/resource owner with allocator and administrative state. Raw field construction/destructuring is trusted framework provisioning, not the opaque gameplay interface. Schema branding alone does not validate forged fields.

type Creation source · line 39 · raw

@Schema:Data -> @Store:Type -> @Resource:Type -> @Event:Data -> Type

Raw creation returns the advanced Factory and World on success; rejection returns the actual Factory and incoming resource owner without constructing C.

type Reservation source · line 44 · raw

@Schema:Data -> Data

Reservation admission result. Reserved provides a full handle but does not activate it or populate components; rejection includes the allocator refusal.

type Status source · line 49 · raw

Data

Low-level operation decision; returned World is separate. Accepted describes that operation, not success of an entire transaction or deferred command queue.

type Registration source · line 54 · raw

Data

Metadata-registration result; id allocation is distinct from owning or running a system. Exhaustion returns RegistrationRejected without a new registration.

Definitions

def factory source · line 115 · raw

Factory

Start a raw namespace sequence at one. This pure constructor is not a global uniqueness service; ordinary independently created Worlds use world-io.bend.

def access_equal source · line 300 · raw

@xs:List<&2, String> -> @ys:List<&2, String> -> Bool

Exact ordered declaration comparison; no normalization grants capabilities.

def matching_access source · line 307 · raw

@sameName:Bool -> @metaAccess:List<&2, String> -> @wantedAccess:List<&2, String> -> Bool

def matching_id source · line 312 · raw

@sameId:Bool -> @metaName:String -> @wantedName:String -> @metaAccess:List<&2, String> -> @wantedAccess:List<&2, String> -> Bool

def registration_meta_matches source · line 317 · raw

@meta:RegistrationMeta -> @+id:U32 -> @+name:String -> @+access:List<&2, String> -> Bool

def registration_list_walk source · line 321 · raw

@registrations:List<&2, RegistrationMeta> -> @+id:U32 -> @+name:String -> @+access:List<&2, String> -> @found:Bool -> Bool

def registration_list_matches source · line 327 · raw

@registrations:List<&2, RegistrationMeta> -> @+id:U32 -> @+name:String -> @+access:List<&2, String> -> Bool

Templates

template clock source · line 59 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick)

Return administrative time without advancing it. Full epoch is required by readers.

template execution_clock source · line 64 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick)

Observe this execution's captured tick without advancing administrative time.

template clock_returned source · line 68 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @namespace:U32 -> @allocator:0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator -> @store:C -> @resource:R -> @events:List<&2, E> -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @registrations:List<&2, RegistrationMeta> -> @nextSystemId:U32 -> @changed:Pair(0x67fd5084c1da4adc13317822045bb11f/clock_state.State, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick) -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick)

template advance_clock source · line 73 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick)

Explicit direct/deferred time boundary; this is not system admission.

template write_clock source · line 78 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick)

Stamp a canonical write with its captured execution tick or a new direct-edit tick.

template enter_run source · line 83 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick)

Enter only after registration admission; capture one tick for all run writes.

template leave_run source · line 88 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> World<S, C, R, E>

Exit an executed run on success or failure, preserving administrative progress.

template ensure_returned source · line 92 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @namespace:U32 -> @allocator:0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator -> @store:C -> @resource:R -> @events:List<&2, E> -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @registrations:List<&2, RegistrationMeta> -> @nextSystemId:U32 -> @result:Pair(0x67fd5084c1da4adc13317822045bb11f/clock_state.State, Bool) -> Pair(World<S, C, R, E>, Bool)

template ensure_run source · line 96 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, Bool)

A direct query owns a new scope; a query inside a system reuses that scope.

template finish_run source · line 99 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @owned:Bool -> @world:World<S, C, R, E> -> World<S, C, R, E>

template handle_index source · line 105 · raw

@-S:Data -> @handle:Handle<S> -> U32

Extract only the slot index for trusted storage adapters. Generation and World namespace are omitted; this projection must not replace handle validation.

template handle_key source · line 109 · raw

@-S:Data -> @handle:Handle<S> -> 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key

Extract the complete index/generation key, without checking namespace or liveness.

template create_checked source · line 117 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-empty:(@_:Unit -> C) -> @available:Bool -> @+namespace:U32 -> @resource:R -> Creation<S, C, R, E>

template create source · line 124 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-empty:(@_:Unit -> C) -> @factory:Factory -> @resource:R -> Creation<S, C, R, E>

Consume the raw Factory and resource owner to construct an empty World, advancing the namespace sequence on success. Namespace exhaustion returns both inputs via CreateRejected. Trusted empty supplies C; use world-io for application creation.

template reserve_result source · line 127 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @+namespace:U32 -> @store:C -> @resource:R -> @+events:List<&2, E> -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @+registrations:List<&2, RegistrationMeta> -> @+nextSystemId:U32 -> @+clock:0x67fd5084c1da4adc13317822045bb11f/clock_state.State -> @allocator:0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator -> @reservation:0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Reservation -> Pair(World<S, C, R, E>, Reservation<S>)

template reserve_join source · line 131 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @+namespace:U32 -> @store:C -> @resource:R -> @+events:List<&2, E> -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @+registrations:List<&2, RegistrationMeta> -> @+nextSystemId:U32 -> @+clock:0x67fd5084c1da4adc13317822045bb11f/clock_state.State -> @reserved:Pair(0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator, 0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Reservation) -> Pair(World<S, C, R, E>, Reservation<S>)

template reserve_id source · line 136 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, Reservation<S>)

Reserve a full allocator key, returning World in both success and refusal. Reservation consumes allocator progress and is not yet visible as a live entity.

template checked_join source · line 139 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @namespace:U32 -> @store:C -> @resource:R -> @events:List<&2, E> -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @registrations:List<&2, RegistrationMeta> -> @nextSystemId:U32 -> @clock:0x67fd5084c1da4adc13317822045bb11f/clock_state.State -> @checked:Pair(0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator, Bool) -> Pair(World<S, C, R, E>, Bool)

template checked_namespace source · line 142 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @allowed:Bool -> @mode:U32 -> @world:World<S, C, R, E> -> @key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> Pair(World<S, C, R, E>, Bool)

template checked source · line 146 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @mode:U32 -> @world:World<S, C, R, E> -> @handle:Handle<S> -> Pair(World<S, C, R, E>, Bool)

template metadata_valid source · line 151 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @handle:Handle<S> -> Pair(World<S, C, R, E>, Bool)

Trusted structural check of namespace and current allocator key metadata, without requiring a live entity. Not a gameplay substitute for valid.

template valid source · line 155 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @handle:Handle<S> -> Pair(World<S, C, R, E>, Bool)

Return World with namespace/full-generation/live validation. Foreign or stale handles fail before allocator slot access for an unmatched namespace.

template pending_valid source · line 159 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @handle:Handle<S> -> Pair(World<S, C, R, E>, Bool)

Return World with validation of actual Pending authority for this full handle. An arbitrary reserved key does not by itself establish that pending authority.

template phase_checked source · line 161 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @phase:0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Phase -> @key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @checked:Pair(World<S, C, R, E>, Bool) -> Pair(World<S, C, R, E>, Status)

template activate source · line 167 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+handle:Handle<S> -> Pair(World<S, C, R, E>, Status)

Trusted lifecycle phase change after metadata validation; returns World and Status. This does not construct components or execute a pending populate closure.

template deactivate source · line 172 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+handle:Handle<S> -> Pair(World<S, C, R, E>, Status)

Opaque storage is retained; this operation cannot make its slot reusable. Mark a metadata-valid entity DeadRetained, returning Status and World. Payloads remain in storage; schema cleanup must precede slot release/reuse.

template discard_status source · line 174 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @observed:Pair(World<S, C, R, E>, Status) -> World<S, C, R, E>

template mark_pending source · line 179 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+handle:Handle<S> -> World<S, C, R, E>

Structural bookkeeping for an actually staged spawn. Metadata validation gates the phase update; this helper alone does not enqueue or populate an entity.

template owner_change source · line 181 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @release:Bool -> @+key:0x67fd5084c1da4adc13317822045bb11f/entity_key.Key -> @checked:Pair(World<S, C, R, E>, Bool) -> World<S, C, R, E>

template clear_pending source · line 188 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+handle:Handle<S> -> World<S, C, R, E>

Abandon actual pending authority without rewinding reserved allocator progress. Used by spawn rollback; does not pretend a reserved id was never consumed.

template release_cleared source · line 193 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+handle:Handle<S> -> World<S, C, R, E>

Only schema-owned cleanup calls this after all payloads and stamps are cleared. Trusted cleanup boundary: release only after schema-owned payload/stamp clearing. Metadata validation is not proof that arbitrary caller-supplied storage is empty.

template command_live source · line 195 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @handle:Handle<S> -> @checked:Pair(World<S, C, R, E>, Bool) -> Pair(World<S, C, R, E>, Bool)

template command_valid source · line 202 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+handle:Handle<S> -> Pair(World<S, C, R, E>, Bool)

Allow a live or actual Pending handle, preserving namespace/generation checks. This permits ordered deferred spawn/despawn workflows without making Pending entities readable through ordinary live-component access.

template enqueue_command source · line 207 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @command:0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>> -> World<S, C, R, E>

Transfer one affine command to the reverse pending accumulator. It is not run until a barrier; arbitrary command bodies are trusted engine adapters.

template enqueue source · line 212 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @command:(@_:World<S, C, R, E> -> World<S, C, R, E>) -> World<S, C, R, E>

Wrap a raw World-to-World closure as a deferred command. No immediate effect or automatic transaction inverse is supplied for the callback.

template drain_fifo source · line 214 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @commands:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @world:World<S, C, R, E> -> World<S, C, R, E>

template drain_apply source · line 218 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @command:0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>> -> @result:Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/trace_facts.State) -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/trace_facts.State)

template drain_fifo_traced source · line 221 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @commands:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @world:World<S, C, R, E> -> @trace:0x67fd5084c1da4adc13317822045bb11f/trace_facts.State -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/trace_facts.State)

template barrier_completed source · line 229 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @result:Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/trace_facts.State) -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/trace_facts.State)

Detach the current pending batch, execute it in FIFO enqueue order, and return World plus operation trace state. Commands enqueued during that drain remain pending for a later barrier; arbitrary callback effects are not transactional.

template barrier_entered source · line 232 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @trace:0x67fd5084c1da4adc13317822045bb11f/trace_facts.State -> @entered:Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/change_tick.Tick) -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/trace_facts.State)

template barrier_traced source · line 236 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @trace:0x67fd5084c1da4adc13317822045bb11f/trace_facts.State -> Pair(World<S, C, R, E>, 0x67fd5084c1da4adc13317822045bb11f/trace_facts.State)

Explicit deferred-application boundary; all commands in this batch share its tick.

template barrier source · line 241 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> World<S, C, R, E>

Apply the current pending command batch in FIFO order with tracing disabled. Returns World; it neither invents a transaction rollback nor recursively drains new work queued by those commands. See commands.bend for lifecycle adapters.

template replace_resource source · line 246 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @replacement:R -> Pair(World<S, C, R, E>, R)

Immediate whole-resource swap returning the displaced actual R owner. This raw administrative operation supplies neither projection restrictions nor undo.

template event_append_loop source · line 250 · raw

@-E:Data -> @reversed:List<&2, E> -> @+output:List<&2, E> -> List<&2, E>

template event_append source · line 255 · raw

@-E:Data -> @+left:List<&2, E> -> @+right:List<&2, E> -> List<&2, E>

template event_publish_nonempty source · line 258 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+published:List<&2, E> -> World<S, C, R, E>

template event_publish source · line 265 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+published:List<&2, E> -> World<S, C, R, E>

An empty publication changes no field and needs no traversal of retained events. Append detached Data events in list order and return World. Empty input preserves World. This does not synchronize typed event Runtime batches/readers or run systems.

template events_view source · line 272 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, List<&2, E>)

Return World and its copied Data event list without consuming or acknowledging reader positions. Affine Type event logs use their separate resource ownership.

template observe_resource_finish source · line 276 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-V:Type -> @observed:Pair(R, V) -> @+namespace:U32 -> @allocator:0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator -> @store:C -> @+events:List<&2, E> -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @+registrations:List<&2, RegistrationMeta> -> @+nextSystemId:U32 -> @+clock:0x67fd5084c1da4adc13317822045bb11f/clock_state.State -> Pair(World<S, C, R, E>, V)

template observe_resource source · line 283 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-V:Type -> @-project:(@_:R -> Pair(R, V)) -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, V)

Trusted resource-owner adapter: project returns the actual R with an Out owner or value, then World is rebuilt. The signature does not prove projection purity or allow duplicating affine resource contents.

template register_checked source · line 287 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @available:Bool -> @world:World<S, C, R, E> -> @+name:String -> @+access:List<&2, String> -> Pair(World<S, C, R, E>, Registration)

template register source · line 295 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+name:String -> @+access:List<&2, String> -> Pair(World<S, C, R, E>, Registration)

Allocate a system metadata id/name/access entry, returning World and Registration. System-id exhaustion preserves World. Metadata alone does not install a runner or validate a gameplay body; ordinary registered-system setup performs that join.

template namespace source · line 332 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, U32)

Return World and its namespace for engine admission checks, not global provenance.

template registration_matches source · line 338 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+id:U32 -> @+name:String -> @+access:List<&2, String> -> Pair(World<S, C, R, E>, Bool)

Check retained id, name and exact ordered access strings while returning World. No sorting/normalization creates extra authority or verifies arbitrary callbacks.

template with_store_finish source · line 342 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Type -> @observed:Pair(C, Out) -> @+namespace:U32 -> @allocator:0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator -> @resource:R -> @+events:List<&2, E> -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @+registrations:List<&2, RegistrationMeta> -> @+nextSystemId:U32 -> @+clock:0x67fd5084c1da4adc13317822045bb11f/clock_state.State -> Pair(World<S, C, R, E>, Out)

template with_store source · line 348 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Out:Type -> @effect:(@_:C -> Pair(C, Out)) -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, Out)

Trusted storage adapter threading actual C and returning Out with World. This is not a gameplay capability or a universal guarantee that effect preserves storage.

template pending_prepend source · line 352 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @command:(@_:World<S, C, R, E> -> World<S, C, R, E>) -> @counted:Pair(List<&1, @_:World<S, C, R, E> -> World<S, C, R, E>>, U32) -> Pair(List<&1, @_:World<S, C, R, E> -> World<S, C, R, E>>, U32)

template pending_length_acc source · line 356 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @commands:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @reversed:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @count:U32 -> Pair(List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>>, U32)

template pending_length source · line 361 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @commands:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> Pair(List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>>, U32)

template pending_count_join source · line 364 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @+namespace:U32 -> @allocator:0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator -> @store:C -> @resource:R -> @+events:List<&2, E> -> @+registrations:List<&2, RegistrationMeta> -> @+nextSystemId:U32 -> @+clock:0x67fd5084c1da4adc13317822045bb11f/clock_state.State -> @counted:Pair(List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>>, U32) -> Pair(World<S, C, R, E>, U32)

template pending_count source · line 370 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, U32)

Count pending affine command closures without executing them, returning World with the original command order and owners retained.

template events_replace source · line 377 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> @+retained:List<&2, E> -> World<S, C, R, E>

Event runtime retention replaces only its owned event domain. Administrative replacement of the Data event domain only. It does not execute pending work, rebuild registrations or reset external event reader owners.

template key_handles source · line 381 · raw

@-S:Data -> @+namespace:U32 -> @keys:List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key> -> List<&2, Handle<S>>

template handles_join source · line 385 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @+namespace:U32 -> @store:C -> @resource:R -> @events:List<&2, E> -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World<S, C, R, E>>> -> @registrations:List<&2, RegistrationMeta> -> @nextSystemId:U32 -> @clock:0x67fd5084c1da4adc13317822045bb11f/clock_state.State -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/entity_allocator.Allocator, List<&2, 0x67fd5084c1da4adc13317822045bb11f/entity_key.Key>) -> Pair(World<S, C, R, E>, List<&2, Handle<S>>)

template handles source · line 390 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:World<S, C, R, E> -> Pair(World<S, C, R, E>, List<&2, Handle<S>>)

Return World and currently visible live full handles in allocator-visible order. Reserved/Pending handles are not an ordinary query membership list yet.