def tx_finish

bendvy-ecs-core@0.1.0.4 · commands.bend:25

import bendvy-ecs-core@0.1.0.4/commands.bend as Commands
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/transaction.bend as T

25# Finish with canonical World adapters: success enqueues staged commands and
26# publishes staged Data events in authored order; failure replays inverse actions
27# and drops staged commands/events. Returns World plus outcome. It does not apply
28# the structural barrier or undo arbitrary external effects.
29def tx_finish(~S: Data,~C: Type,~R: Type,~E: Data,~Error: Data,tx: T.Tx<W.World<S,C,R,E>,E>,outcome: T.Outcome<Error>) -> T.Returned<W.World<S,C,R,E>,Error>:
30  T.finish(~W.World<S,C,R,E>,~E,~Error,~enqueue(~S,~C,~R,~E),~publish(~S,~C,~R,~E),tx,outcome)

Uses (7)

Used by (20)