~/bend-docscommunity

snapshot.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.7/snapshot.bend as Snapshot

6 imports
import Base
import entity_key.bend as Key
import ./snapshot_schema.bend as Schema
import ./snapshot_data.bend as Export
import ./decode_data.bend as D
import ./world.bend as W

Templates

template prepend source · line 8 · raw

@-C:Type -> @entity:0x7e321819d0ff210531780719c7674cef/snapshot_data.Entity -> @observed:Pair(C, List<&2, 0x7e321819d0ff210531780719c7674cef/snapshot_data.Entity>) -> Pair(C, List<&2, 0x7e321819d0ff210531780719c7674cef/snapshot_data.Entity>)

template stepped source · line 11 · raw

@-C:Type -> @next:(@_:C -> Pair(C, List<&2, 0x7e321819d0ff210531780719c7674cef/snapshot_data.Entity>)) -> @id:0x7e321819d0ff210531780719c7674cef/entity_key.Key -> @observed:Pair(C, List<&2, 0x7e321819d0ff210531780719c7674cef/decode_data.Field>) -> Pair(C, List<&2, 0x7e321819d0ff210531780719c7674cef/snapshot_data.Entity>)

template rows source · line 14 · raw

@-S:Data -> @-C:Type -> @-components:(@_:U32 -> @_:C -> Pair(C, List<&2, 0x7e321819d0ff210531780719c7674cef/decode_data.Field>)) -> @handles:List<&2, 0x7e321819d0ff210531780719c7674cef/world.Handle<S>> -> @owner:C -> Pair(C, List<&2, 0x7e321819d0ff210531780719c7674cef/snapshot_data.Entity>)

template save source · line 31 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-components:(@_:U32 -> @_:C -> Pair(C, List<&2, 0x7e321819d0ff210531780719c7674cef/decode_data.Field>)) -> @-resources:(@_:R -> Pair(R, List<&2, 0x7e321819d0ff210531780719c7674cef/decode_data.Field>)) -> @schema:0x7e321819d0ff210531780719c7674cef/snapshot_schema.Schema<S, C, R, True{}, components, resources> -> @world:0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E> -> Pair(0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, 0x7e321819d0ff210531780719c7674cef/snapshot_data.Outcome<0x7e321819d0ff210531780719c7674cef/snapshot_data.Snapshot>)

Public call requires the SAME complete ordinary schema to be save-eligible. Plain leaves propagate False through product and cannot call this method. Export version-1 detached entity/component/resource Data and allocator progress, returning the live World owner through every projection. Live handles supply saved keys; this is not a runtime checkpoint or an implicit structural barrier. The complete schema must carry True eligibility: persisted leaves use declared projections/codecs, while explicit transient leaves are omitted. Closed schema projections and name bindings remain trusted setup, not arbitrary descriptor validation inferred from this wrapper. The save contains no registration owners, reader positions or event-log checkpoint. Pending structural commands refuse BEFORE any projection, returning the same World/queue as RefusedPending. No implicit barrier runs; apply an explicit barrier and retry when appropriate. See docs/parity/snapshot-export.md and its ordinary constructor/save consumer.