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