def restored
bendvy-ecs-core@0.1.0.3 · execution_relation_resource_publication.bend:17
import bendvy-ecs-core@0.1.0.3/execution_relation_resource_publication.bend as ExecutionRelationResourcePublication
import Base
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/execution_relation_store.bend as Store
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as Allocator
17def restored(~S:Data,~WR:Type,~resources:Layout.Layout,~same:{WR == Layout.resources(~S,resources) : Type},~route:Layout.Route,~descriptor:T.Descriptor<S>,~payload:{Layout.payload(resources,route) == Store.Store<S,descriptor> : Type},~view:{Layout.view(resources,route) == Store.View<S,descriptor> : Data},rest:Layout.resource_rest(~S,resources,route),result:Allocator.Allocator & (Layout.ResourceSlot<S,Layout.Viewed<Store.Store<S,descriptor>,Store.View<S,descriptor>>,Layout.key(resources,route),Layout.origin(resources,route)> & Store.Receipt<S>)) -> Allocator.Allocator & (WR & Store.Receipt<S>):
18 match result:
19 case (allocator,(selected,receipt)):(allocator,(Layout.checked_owner(Layout.resources(~S,resources),WR,Equal.sym(Type,WR,Layout.resources(~S,resources),same),Layout.resource_put(~S,resources,route,rest,slot(~S,~Layout.key(resources,route),~Layout.origin(resources,route),~Store.Store<S,descriptor>,~Layout.payload(resources,route),~Store.View<S,descriptor>,~Layout.view(resources,route),Equal.sym(Type,Layout.payload(resources,route),Store.Store<S,descriptor>,payload),Equal.sym(Data,Layout.view(resources,route),Store.View<S,descriptor>,view),selected))),receipt))