def read_slot

bendvy-ecs-core@0.1.0.3 · execution_resource_interpreter.bend:11

import bendvy-ecs-core@0.1.0.3/execution_resource_interpreter.bend as ExecutionResourceInterpreter
import Base
import bendvy-ecs-core@0.1.0.3/execution_resource_store.bend as Store
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as L

11def read_slot(-S:Data,-P:Type,-V:Data,-key:String,-origin:L.Layout,-Rest:Type,-Resources:Type,put:Rest -> L.ResourceSlot<S,L.Viewed<P,V>,key,origin> -> Resources,result:Rest & L.ResourceSlot<S,L.Viewed<P,V>,key,origin>) -> Resources & Store.Lookup<V>:
12  match result:
13    case (rest,L.ResourceSlot{L.Viewed{owner,+cache},+stamp}):(put(rest,L.ResourceSlot{L.Viewed{owner,cache},stamp}),Store.Viewed{cache,stamp})

Uses (7)

Used by (2)