def ports_checked

bendvy-ecs-core@0.1.0.4 · system_cleanup.bend:19

import bendvy-ecs-core@0.1.0.4/system_cleanup.bend as SystemCleanup
import Base
import world.bend as W
import system.bend as Sys

19def ports_checked(~S: Data,~C: Type,~R: Type,~E: Data,~Args: Type,~Error: Data,~Output: Type,~run: W.World<S,C,R,E> -> Args -> Sys.Outcome<W.World<S,C,R,E>,Error,Output>,~Ports: Type,~remove: W.World<S,C,R,E> -> Ports -> W.World<S,C,R,E>,registry: Sys.Registry<S,C,R,E,Args,Error,Output,run>,world: W.World<S,C,R,E>,observed: Ports & Bool) -> Cleanup<S,C,R,E,Args,Error,Output,run,Ports>:
20  match observed:
21    case (ports,False{}): CleanupRejected{world,Instance{registry,ports}}
22    case (ports,True{}): disposal_result(~S,~C,~R,~E,~Args,~Error,~Output,~run,~Ports,~remove,ports,Sys.dispose(~S,~C,~R,~E,~Args,~Error,~Output,~run,registry,world))

Uses (10)

Used by (1)