def tx_set

bendvy-ecs-core@0.1.0.4 · component.bend:331

import bendvy-ecs-core@0.1.0.4/component.bend as Component
import Base
import column.bend as Col
import world.bend as W
import transaction.bend as T

331# Write an actual possibly-affine Type payload into the current Tx World and
332# journal the old payload and stamp for rollback. Successful writes are visible
333# within this Tx immediately; finish decides commit versus inverse replay. Refusal
334# returns the incoming owner through WriteRejected. Ordinary rollback is not a
335# receipt returning every newly written payload; use explicit recovery APIs for that.
336def tx_set(~S: Data,~Store: Type,~R: Type,~E: Data,~Rest: Type,~C: Type,~V: Data,~Token: Data,~take: Store -> Rest & Col.Column<S,C>,~put: Rest -> Col.Column<S,C> -> Store,~project: C -> C & V,+family: Family<S,Store,Rest,C,V,Token,take,put,project>,tx: T.Tx<W.World<S,Store,R,E>,E>,+handle: W.Handle<S>,incoming: C) -> SetResult<T.Tx<W.World<S,Store,R,E>,E>,C>:
337  match tx:
338    case T.Tx{world,undo,commands,events,trace}:
339      tx_set_fused(~S,~Store,~R,~E,~Rest,~C,~V,~Token,~take,~put,~project,family,handle,undo,commands,events,trace,stamped_allowed(~S,~Store,~R,~E,~Rest,~C,~V,~Token,~take,~put,~project,W.valid(~S,~Store,~R,~E,world,handle),handle,incoming))

Uses (10)

Used by (5)