def emit

bendvy-ecs-core@0.1.0.4 · transaction.bend:53

import bendvy-ecs-core@0.1.0.4/transaction.bend as Transaction
import Base

53# Stage one Data event, retaining publication order for successful commit.
54# Failure publishes none of this transaction's staged events. For affine
55# Type payload ownership/recovery use the separate owned-event APIs.
56def emit(~W: Type, ~E: Data, tx: Tx<W, E>, event: E) -> Tx<W, E>:
57  match tx:
58    case Tx{world, undo, commands, events,trace}:
59      Tx{world, undo, commands, event <> events,trace}

Uses (2)

Used by (4)