def prepare

bendvy-ecs-core@0.1.0.4 · restore_public.bend:11

import bendvy-ecs-core@0.1.0.4/restore_public.bend as RestorePublic
import Base
import bendvy-ecs-core@0.1.0.4/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.4/restore_data.bend as R
import bendvy-ecs-core@0.1.0.4/restore_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/restore_prepare.bend as Prepare
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/snapshot_data.bend as Snapshot
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D

11# Validate and stage a typed snapshot using the retained schema, without a World
12# argument or live-world mutation. Check version, nextEntity bounds, duplicate saved
13# keys, and schema field dispatch/construction before returning Ready or Refused.
14# Refusal retains the input and staging State; staged owners are released through
15# the schema adapter where preparation stops. This is typed input, not Raw parsing.
16# Use schema-derived codecs/factories; arbitrary adapter behavior is trusted setup.
17def prepare(~S:Data,~C:Type,~Resources:Type,~E:Data,~State:Type,~Custom:Data,~stage:State -> R.Position -> D.Field -> State & R.Dispatch<Custom>,~release:State -> State,~clear:C -> W.Handle<S> -> C & List<&2,R.Change<S>>,~insert:C -> Resources -> State -> List<&2,R.Binding<S>> -> Tick.Tick -> (C & Resources) & State,~Recovery:Type,~commit:State -> State,~takeRecovery:State -> State & Recovery,schema:Schema.Schema<S,C,Resources,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery>,state:State,input:Snapshot.Snapshot) -> R.Prepared<State,Custom>:
18  Prepare.prepare(~State,~Custom,~stage,~release,state,input)

Uses (13)

Used by (1)