def restore

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

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_apply.bend as Apply
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

29# Convenience prepare-then-apply on the same schema and staging State. Complete
30# input preparation precedes application; returned State remains an owned result.
31# For persistent constructor context and explicit recovery, use owned then run.
32# See docs/parity/restore-basic.md and its ordinary Restore.restore consumer.
33def restore(~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,~emit:R.Change<S> -> E,+schema:Schema.Schema<S,C,Resources,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery>,world:W.World<S,C,Resources,E>,state:State,input:Snapshot.Snapshot) -> Apply.ApplyResult<S,C,Resources,E,State,Custom>:
34  apply(~S,~C,~Resources,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~emit,schema,world,prepare(~S,~C,~Resources,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,schema,state,input))

Uses (15)

Used by (1)