def selected
bendvy-ecs-core@0.1.0.3 · execution_relation_resource_dispatch.bend:28
import bendvy-ecs-core@0.1.0.3/execution_relation_resource_dispatch.bend as ExecutionRelationResourceDispatch
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_resource_publication.bend as Publication
import bendvy-ecs-core@0.1.0.3/execution_relation_context.bend as Context
import bendvy-ecs-core@0.1.0.3/execution_relation_store.bend as Store
import bendvy-ecs-core@0.1.0.3/execution_relation_operation.bend as Operation
import bendvy-ecs-core@0.1.0.3/execution_resource_policy.bend as Policy
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as Allocator
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
28def selected(~S:Data,~resources:Layout.Layout,~route:Layout.Route,~valid:{Layout.grant_valid(~resources,~route) == True{} : Bool},~descriptor:T.Descriptor<S>,~payload:{Layout.payload(resources,route) == Store.Store<S,descriptor> : Type},~view:{Layout.view(resources,route) == Store.View<S,descriptor> : Data},~protected:{Layout.policy(resources,route) == Policy.ProtectedRelation{S,descriptor} : Policy.Policy},matches:Bool,previous:Program(~S,~resources),expected:U32,actual:U32,allocator:Allocator.Allocator,owners:Layout.resources(~S,resources),requested:Layout.Route,operation:Operation.Operation<S>,tick:Tick.Tick) -> Allocator.Allocator & (Layout.resources(~S,resources) & Outcome<S>):
29 match matches:
30 case False{}:previous(expected,actual,allocator,owners,requested,operation,tick)
31 case True{}:published(~S,~resources,Publication.apply(~S,~Layout.resources(~S,resources),~resources,~{==},~route,~valid,~descriptor,~payload,~view,Context.Context{expected},actual,allocator,owners,operation,tick))