ExecutionEventFamily.publish: def of bendvy-ecs-core@0.1.0.3
Import: import bendvy-ecs-core@0.1.0.3/execution_event_family.bend as ExecutionEventFamily
Lines 57-63 of bendvy-ecs-core@0.1.0.3/execution_event_family.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/execution_event_family.bend&start_line=57&end_line=63
import Base
import bendvy-ecs-core@0.1.0.3/owned_event_log.bend as Log
# Publication updates the owned log immediately, as Bevy Messages.write does.
# https://github.com/bevyengine/bevy/blob/ad678262ce53b5d142fe49ee5e08caff6f00ab60/crates/bevy_ecs/src/message/messages.rs#L120-L143
# A later handled body error does not stage or undo this already-authored send.
def publish(~S:Data,~P:Type,~key:String,family:Family,payload:P) -> Family & Publication
: match family: case Family{identity,False{},log,previous,current,nextReader,active,dropped}:(Family{identity,False{},log,previous,current,nextReader,active,dropped},PublicationRefused{payload}) case Family{identity,True{},log,previous,current,nextReader,active,dropped}:published(~S,~P,~key,identity,previous,current,nextReader,active,dropped,Log.append(~P,log,payload)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_event_family.bend&name=Family https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_event_family.bend&name=Publication https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_event_family.bend&name=published https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/owned_event_log.bend&name=append