def validate
bendvy-ecs-core@0.1.0.4 · relation_reorder_core.bend:43
import bendvy-ecs-core@0.1.0.4/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(~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(~S,graph,d,parent),child_ids(children)),subset(C.inverse(~S,graph,d,parent),child_ids(children))),children_checked(~S,children,graph,d,parent,[]),parent,C.name(~S,d))