def failed

bendvy-ecs-core@0.1.0.3 · execution_relation_failure_message.bend:18

import bendvy-ecs-core@0.1.0.3/execution_relation_failure_message.bend as ExecutionRelationFailureMessage
import Base
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/execution_relation_operation.bend as O

18def failed(~S:Data,~descriptor:T.Descriptor<S>,operation:O.Operation<S>,+error:T.Error) -> Message<S,descriptor>:
19  match operation:
20    case O.Relate{+source,+target}:RelationFailed{O.Relate{source,target},T.Failure{descriptor,T.Relate{},W.handle_key(~S,source),W.handle_key(~S,target),error}}
21    case O.Unrelate{+source}:UnrelateFailed{O.Unrelate{source},W.handle_key(~S,source),error}
22    case O.Reorder{+parent,children}:RelationFailed{O.Reorder{parent,children},T.Failure{descriptor,T.ReorderChildren{},W.handle_key(~S,parent),error_target(error,W.handle_key(~S,parent)),error}}

Uses (8)

Used by (1)