execution_relation_operation.bend

bendvy-ecs-core@0.1.0.3 · 15 lines · 3 definitions

1import Base
2import bendvy-ecs-core@0.1.0.3/world.bend as W
3import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
4
5# Descriptor selection belongs to the declaration, not to a queued request.
6type Operation<S:Data> is Data:
7  Relate{source:W.Handle<S>,target:W.Handle<S>}
8  Unrelate{source:W.Handle<S>}
9  Reorder{parent:W.Handle<S>,children:List<&2,W.Handle<S>>}
10type Reason is Data:
11  RelationError{error:T.Error}
12  HierarchyRequired{}
13type Outcome<S:Data> is Data:
14  Applied{graph:T.Graph<S>,operation:Operation<S>}
15  Refused{graph:T.Graph<S>,operation:Operation<S>,reason:Reason}