def save
import bendvy-ecs-core@0.1.0.4/snapshot.bend as Snapshotimport Base
import bendvy-ecs-core@0.1.0.4/snapshot_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/snapshot_data.bend as Export
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/world.bend as W
18# Public call requires the SAME complete ordinary schema to be save-eligible.
19# Plain leaves propagate False through product and cannot call this method.
20# Export version-1 detached entity/component/resource Data and allocator progress,
21# returning the live World owner through every projection. Live handles supply
22# saved keys; this is not a runtime checkpoint or an implicit structural barrier.
23# The complete schema must carry True eligibility: persisted leaves use declared
24# projections/codecs, while explicit transient leaves are omitted. Closed schema
25# projections and name bindings remain trusted setup, not arbitrary descriptor
26# validation inferred from this wrapper. The save contains no registration owners,
27# reader positions or event-log checkpoint. Pending structural commands refuse
28# BEFORE any projection, returning the same World/queue as RefusedPending. No
29# implicit barrier runs; apply an explicit barrier and retry when appropriate.
30# See docs/parity/snapshot-export.md and its ordinary constructor/save consumer.
31def save(~S:Data,~C:Type,~R:Type,~E:Data,~components:U32 -> C -> C & List<&2,D.Field>,~resources:R -> R & List<&2,D.Field>,schema:Schema.Schema<S,C,R,True{},components,resources>,world:W.World<S,C,R,E>) -> W.World<S,C,R,E> & Export.Outcome<Export.Snapshot>:
32 Export.basic(~S,~C,~R,~E,~rows(~S,~C,~components),~resources,world)
Uses (11)
Used by (0)
No other definition uses this definition.