def update
import bendvy-ecs-core@0.1.0.3/execution_event_family.bend as ExecutionEventFamilyimport Base
import bendvy-ecs-core@0.1.0.3/owned_event_log.bend as Log
99# Messages.update_drain returns the previous generation's actual payload owners.
100# https://github.com/bevyengine/bevy/blob/ad678262ce53b5d142fe49ee5e08caff6f00ab60/crates/bevy_ecs/src/message/messages.rs#L187-L218
101# Bend returns retained rows explicitly instead of claiming an automatic IO finalizer.
102def update(~S:Data,~P:Type,~key:String,family:Family<S,P,key>) -> Family<S,P,key> & List<Log.Row<P>>:
103 match family:
104 case Family{identity,False{},log,previous,current,nextReader,active,dropped}:(Family{identity,False{},log,previous,current,nextReader,active,dropped},[])
105 case Family{identity,True{},log,previous,+current,nextReader,active,dropped}:updated(~S,~P,~key,identity,current,nextReader,active,highest(previous,dropped),Log.retain(~P,log,current))
Uses (10)
Used by (0)
No other definition uses this definition.