def publish_relate
bendvy-ecs-core@0.1.0.4 · relation_commands.bend:37
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as RelationCommands
import Base
import entity_key.bend as Key
import relation_types.bend as G
import world.bend as W
37def publish_relate(~S: Data,~C: Type,~R: Type,~E: Data,observed: W.World<S,Store<S,C>,R,Notice<S,E>> & Maybe<&2,G.Error>,descriptor: G.Descriptor<S>,source:Key.Key,target:Key.Key) -> W.World<S,Store<S,C>,R,Notice<S,E>>:
38 match observed:
39 case (world,None{}): world
40 case (world,Some{error}): W.event_publish(~S,~Store<S,C>,~R,~Notice<S,E>,world,[RelationFailed{G.Failure{descriptor,G.Relate{},source,target,error}}])