def has_protected

bendvy-ecs-core@0.1.0.3 · execution_lifetime_scope_coverage.bend:62

import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_coverage.bend as ExecutionLifetimeScopeCoverage
import Base
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout

62def has_protected(current:Layout.Layout) -> Bool:
63  match current:
64    case Layout.EmptyLayout{}:False{}
65    case Layout.LayoutLeaf{_,_,_,_,policy}:protected_leaf(policy)
66    case Layout.ClassifiedLayoutLeaf{_,_,_,_,_,policy}:protected_leaf(policy)
67    case Layout.LayoutPair{left,right}:Bool.or(has_protected(left),has_protected(right))

Uses (4)

Used by (2)