def extend_scope_selection

bendvy-ecs-core@0.1.0.3 · execution_command_permission.bend:48

import bendvy-ecs-core@0.1.0.3/execution_command_permission.bend as ExecutionCommandPermission
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_resource_policy.bend as Policy
import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_resource_dispatch.bend as ScopeDispatch
import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_store.bend as ScopeStore

48def extend_scope_selection(~S:Data,~resources:Layout.Layout,~route:Layout.Route,~valid:{Layout.grant_valid(~resources,~route) == True{} : Bool},~payload:{Layout.payload(resources,route) == ScopeStore.Store<S> : Type},~view:{Layout.view(resources,route) == ScopeStore.View<S> : Data},~protected:{Layout.policy(resources,route) == Policy.ProtectedLifetimeScope{S} : Policy.Policy},selection:Selection<S,resources>) -> Selection<S,resources>:
49  match selection:
50    case Selection{program,snapshot,scopes,cleanup}:Selection{program,snapshot,ScopeDispatch.extend(~S,~resources,~route,~valid,~payload,~view,~protected,scopes),cleanup}

Uses (12)

Used by (2)