def pair_dispatch

bendvy-ecs-core@0.1.0.4 · captured_schedule_composition.bend:69

import bendvy-ecs-core@0.1.0.4/captured_schedule_composition.bend as CapturedScheduleComposition
import Base

69# Advanced heterogeneous dispatch using the left catalog to choose a branch.
70# Retains both owners, wraps errors as LeftError/RightError and preserves skip/
71# refusal outcomes. The selected dispatcher performs registration validation;
72# metadata membership alone confers no authority and adds no rollback.
73def pair_dispatch(~World:Type,~L:Type,~R:Type,~LE:Data,~RE:Data,~catalog:L -> L & List<&2,Identity>,~left:L -> World -> U32 -> Outcome<World,L,LE>,~right:R -> World -> U32 -> Outcome<World,R,RE>,owners:L & R,world:World,id:U32) -> Outcome<World,L & R,Choice<LE,RE>>:
74  match owners:
75    case (a,b):pair_cataloged(~World,~L,~R,~LE,~RE,~left,~right,b,world,id,catalog(a))

Uses (8)

Used by (0)

No other definition uses this definition.