def child_error

bendvy-ecs-core@0.1.0.3 · relation_reorder_core.bend:24

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

24def child_error(live: Bool,duplicate: Bool,related: Bool,parent: K.Key,child: K.Key,+name: String) -> Maybe<&2,T.Error>:
25  match live duplicate related:
26    case False{} _ _: Some{T.MissingChildEntity{parent,child,name}}
27    case True{} True{} _: Some{T.DuplicateChild{parent,child,name}}
28    case True{} False{} False{}: Some{T.ChildNotRelatedToParent{parent,child,name}}
29    case True{} False{} True{}: None{}

Uses (5)

Used by (1)