def run
import bendvy-ecs-core@0.1.0.4/restore_public.bend as RestorePublicimport 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/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
57# Consume and return the restore Owner with the World, detached Outcome and actual
58# Recovery owner. Success commits staging before taking recovery; refusal releases
59# staging before taking recovery. Follow the concrete schema recovery type: returned
60# inputs are not duplicate copies of payloads installed into the World. No implicit
61# destructor or full Runtime reset is supplied by this operation.
62def run(~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,owner:Owner<S,C,Resources,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery>,world:W.World<S,C,Resources,E>,input:Snapshot.Snapshot) -> W.World<S,C,Resources,E> & (Owner<S,C,Resources,State,Custom,stage,release,clear,insert,Recovery,commit,takeRecovery> & (Outcome<S,Custom> & Recovery)):
63 match owner:
64 case Owner{+schema,state}:run_returned(~S,~C,~Resources,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,schema,restore(~S,~C,~Resources,~E,~State,~Custom,~stage,~release,~clear,~insert,~Recovery,~commit,~takeRecovery,~emit,schema,world,state,input))
Uses (15)
Used by (0)
No other definition uses this definition.