~/bend-docscommunity

snapshot_data.bend checks

raw source on the hub · import 0x67fd5084c1da4adc13317822045bb11f/snapshot_data.bend as Snapshot_data

7 imports
import Base
import ./clock_state.bend as Clock
import entity_key.bend as Key
import entity_allocator.bend as Alloc
import ./world.bend as W
import ./decode_data.bend as D
import ./deferred_command.bend as Deferred

Types

type Entity source · line 10 · raw

Data

Basic detached Data only; runtime checkpoint state is intentionally not encoded.

type Snapshot source · line 12 · raw

Data

type Outcome source · line 17 · raw

@A:Data -> Data

Ordinary save either exports detached Data or refuses pending structural work. Refusal returns the same World separately; it does not execute or discard work.

Templates

template pending_ready source · line 21 · raw

@-World:Type -> @pending:List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World>> -> Pair(List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<World>>, Bool)

template ready_joined source · line 25 · 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, 0x67fd5084c1da4adc13317822045bb11f/world.RegistrationMeta> -> @nextSystemId:U32 -> @clock:0x67fd5084c1da4adc13317822045bb11f/clock_state.State -> @result:Pair(List<&1, 0x67fd5084c1da4adc13317822045bb11f/deferred_command.Command<0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>>>, Bool) -> Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Bool)

template ready source · line 29 · raw

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

Internal constant-time structural admission, before any trusted projection.

template allocator source · line 35 · raw

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

Internal experimental accessor: exact actual allocator, no inferred live count. Rebuild the SAME owner with every field returned unchanged.

template finish source · line 43 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @nextEntity:U32 -> @entities:List<&2, Entity> -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, List<&2, 0x67fd5084c1da4adc13317822045bb11f/decode_data.Field>) -> Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Snapshot)

Closed schema providers must return the actual store/resource owners. Their projections, transient omission and name bindings are trusted author inputs. This is NOT the still-missing public constructed-descriptor validation gate.

template with_entities source · line 46 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-resources:(@_:R -> Pair(R, List<&2, 0x67fd5084c1da4adc13317822045bb11f/decode_data.Field>)) -> @nextEntity:U32 -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, List<&2, Entity>) -> Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Snapshot)

template with_handles source · line 49 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-rows:(@_:List<&2, 0x67fd5084c1da4adc13317822045bb11f/world.Handle<S>> -> @_:C -> Pair(C, List<&2, Entity>)) -> @-resources:(@_:R -> Pair(R, List<&2, 0x67fd5084c1da4adc13317822045bb11f/decode_data.Field>)) -> @nextEntity:U32 -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, List<&2, 0x67fd5084c1da4adc13317822045bb11f/world.Handle<S>>) -> Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Snapshot)

template with_allocator source · line 52 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-rows:(@_:List<&2, 0x67fd5084c1da4adc13317822045bb11f/world.Handle<S>> -> @_:C -> Pair(C, List<&2, Entity>)) -> @-resources:(@_:R -> Pair(R, List<&2, 0x67fd5084c1da4adc13317822045bb11f/decode_data.Field>)) -> @observed:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, U32) -> Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Snapshot)

template saved source · line 55 · raw

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

template basic_ready source · line 58 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-rows:(@_:List<&2, 0x67fd5084c1da4adc13317822045bb11f/world.Handle<S>> -> @_:C -> Pair(C, List<&2, Entity>)) -> @-resources:(@_:R -> Pair(R, List<&2, 0x67fd5084c1da4adc13317822045bb11f/decode_data.Field>)) -> @result:Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Bool) -> Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Outcome<Snapshot>)

template basic source · line 62 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-rows:(@_:List<&2, 0x67fd5084c1da4adc13317822045bb11f/world.Handle<S>> -> @_:C -> Pair(C, List<&2, Entity>)) -> @-resources:(@_:R -> Pair(R, List<&2, 0x67fd5084c1da4adc13317822045bb11f/decode_data.Field>)) -> @world:0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E> -> Pair(0x67fd5084c1da4adc13317822045bb11f/world.World<S, C, R, E>, Outcome<Snapshot>)