def restored_lookup

bendvy-ecs-core@0.1.0.4 · inspector_runtime.bend:85

import bendvy-ecs-core@0.1.0.4/inspector_runtime.bend as InspectorRuntime
import Base
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/inspector.bend as I
import bendvy-ecs-core@0.1.0.4/inspector_stream_frame.bend as F

85# A handle lookup remains an ordinary runtime argument. This lift restores the
86# event owner around the existing Inspector lookup without capturing a handle
87# or detaching any of the runtime's reader/event metadata. It preserves the
88# supplied trusted grant and does not make an arbitrary Lookup closure safe.
89def restored_lookup(~S:Data,~C:Type,~R:Type,~E:Data,~V:Data,observed:I.Frame<S,C,R,A.Notice<S,E>> & I.Value<V>,namespace:U32,batches:List<&2,Ev.Batch<A.Notice<S,E>>>,positions:List<&2,Ev.Position>,nextReader:U32,tick:Nat,frameStart:Nat,boundary:Nat,capacity:Nat,dropped:Nat) -> F.Frame<S,C,R,E> & I.Value<V>:
90  match observed:
91    case (I.Frame{world,cursor},value):(F.Frame{Ev.Runtime{world,namespace,batches,positions,nextReader,tick,frameStart,boundary,capacity,dropped},cursor},value)

Uses (12)

Used by (1)