def replace_resource
import bendvy-ecs-core@0.1.0.3/world.bend as Worldimport Base
246# Immediate whole-resource swap returning the displaced actual R owner. This raw
247# administrative operation supplies neither projection restrictions nor undo.
248def replace_resource(~S: Data,~C: Type,~R: Type,~E: Data,world: World<S,C,R,E>,replacement: R) -> World<S,C,R,E> & R:
249 match world:
250 case World{+namespace,allocator,store,resource,+events,pending,+registrations,+nextSystemId,+clock,lifecycle}: (World{namespace,allocator,store,replacement,events,pending,registrations,nextSystemId,clock,lifecycle},resource)
Uses (3)
Used by (0)
No other definition uses this definition.