def register

bendvy-ecs-core@0.1.0.4 · event_runtime.bend:210

import bendvy-ecs-core@0.1.0.4/event_runtime.bend as EventRuntime
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/system.bend as Sy

210# Register a runner with supplied name/access on the actual World, allocate its
211# reader token on success and return Runtime on refusal. This does not run the
212# body or activate a reader position; unused registrations do not retain backlog.
213# Name/access and runner coherence are trusted lower-level provisioning.
214def register(~S: Data,~C: Type,~R: Type,~E: Data,~A: Type,~Error: Data,~O: Type,~runner: W.World<S,C,R,E> -> Input<E,A> -> Sy.Outcome<W.World<S,C,R,E>,Error,O>,runtime: Runtime<S,C,R,E>,+name: String,+access: List<&2,String>) -> Registered<S,C,R,E,A,Error,O,runner>:
215  match runtime:
216    case Runtime{world,+namespace,+batches,+positions,+nextReader,+tick,+frameStart,+boundary,+capacity,+dropped}: registered_result(~S,~C,~R,~E,~A,~Error,~O,~runner,Sy.register(~S,~C,~R,~E,~Input<E,A>,~Error,~O,~runner,world,name,access),namespace,batches,positions,nextReader,tick,frameStart,boundary,capacity,dropped)

Uses (9)

Used by (2)