def returned
bendvy-ecs-core@0.1.0.3 · execution_relation_publication.bend:18
import bendvy-ecs-core@0.1.0.3/execution_relation_publication.bend as ExecutionRelationPublication
import Base
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as A
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/execution_relation_store.bend as Store
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/lifecycle.bend as Life
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
18def returned(~S:Data,~descriptor:T.Descriptor<S>,~key:String,~origin:Layout.Layout,tick:Tick.Tick,stamp:Life.Stamp,priorView:Store.View<S,descriptor>,result:A.Allocator & (Store.Store<S,descriptor> & Store.Receipt<S>)) -> A.Allocator & (Layout.ResourceSlot<S,Layout.Viewed<Store.Store<S,descriptor>,Store.View<S,descriptor>>,key,origin> & Store.Receipt<S>):
19 match result:
20 case (allocator,(store,Store.Applied{operation})):refreshed(~S,~descriptor,~key,~origin,allocator,Life.after_write(True{},True{},stamp,tick),operation,Store.project(~S,~descriptor,store))
21 case (allocator,(store,Store.Refused{operation,reason})):refusal_refreshed(~S,~descriptor,~key,~origin,allocator,stamp,operation,reason,Store.project(~S,~descriptor,store))