def apply_snapshot
import bendvy-ecs-core@0.1.0.3/machine.bend as Machineimport Base
107# Captured initial value is authoritative; current pending is deleted at the
108# machine's turn, matching Runtime.ts:1534 even when an earlier hook overwrote it.
109def apply_snapshot(~S: Data,~M: Data,~V: Data,~same: V -> V -> Bool,slot: Slot<S,M,V>,captured: Snapshot<V>) -> Applied<S,M,V>:
110 match slot captured:
111 case slot Unscheduled{}: Applied{slot,None{}}
112 case Missing{} Scheduled{_,_}: Applied{Missing{},None{}}
113 case Present{current,_,previous,changed} Scheduled{value,skipSame}:
114 apply_present(~S,~M,~V,~same,current,value,previous,changed,skipSame)
Uses (6)
Used by (0)
No other definition uses this definition.