execution_resource_policy.bend

bendvy-ecs-core@0.1.0.3 · 13 lines · 2 definitions

1import Base
2import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
3
4# Authority and persistence are independent properties of a canonical leaf.
5type Policy is Type:
6  Ordinary{}
7  ProtectedRelation{S:Data,descriptor:T.Descriptor<S>}
8  ProtectedLifetimeScope{S:Data}
9def generic_write(policy:Policy) -> Bool:
10  match policy:
11    case Ordinary{}:True{}
12    case ProtectedRelation{_,_}:False{}
13    case ProtectedLifetimeScope{_}:False{}