def policy
bendvy-ecs-core@0.1.0.3 · execution_composer_layout.bend:39
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as ExecutionComposerLayout
import Base
import bendvy-ecs-core@0.1.0.3/execution_resource_policy.bend as Policy
39
40def policy(layout:Layout,route:Route) -> Policy.Policy:
41 match layout route:
42 case LayoutLeaf{_,_,_,_,access} AtLeaf{}:access
43 case ClassifiedLayoutLeaf{_,_,_,_,_,access} AtLeaf{}:access
44 case LayoutPair{left,_} InLeft{rest}:policy(left,rest)
45 case LayoutPair{_,right} InRight{rest}:policy(right,rest)
46 case _ _:Policy.Ordinary{}