def validate_erased
bendvy-ecs-core@0.1.0.3 · relation_reorder_core.bend:43
import bendvy-ecs-core@0.1.0.3/relation_reorder_core.bend as RelationReorderCore
import Base
import entity_key.bend as K
import relation_types.bend as T
import relation_graph.bend as C
43def validate_erased(-S: Data,parentLive: Bool,+graph: T.Graph<S>,+d: T.Descriptor<S>,+parent: K.Key,+children: List<&2,T.ChildStatus>) -> Maybe<&2,T.Error>:
44 match parentLive:
45 case False{}: Some{T.MissingEntity{parent}}
46 case True{}: mismatch(Bool.and(same_count(C.inverse_erased(S,graph,d,parent),child_ids(children)),subset(C.inverse_erased(S,graph,d,parent),child_ids(children))),children_checked_erased(S,children,graph,d,parent,[]),parent,C.name_erased(S,d))