def checked

bendvy-ecs-core@0.1.0.4 · local.bend:95

import bendvy-ecs-core@0.1.0.4/local.bend as Local
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W

95def checked(~S: Data,~C: Type,~R: Type,~E: Data,~L: Type,~Args: Type,~Error: Data,~Out: Type,~runner: W.World<S,C,R,E> -> L -> Args -> Outcome<W.World<S,C,R,E>,L,Error,Out>,allowed: Bool,instance: Instance<S,C,R,E,L,Args,Error,Out,runner>,world: W.World<S,C,R,E>,args: Args) -> Run<S,C,R,E,L,Args,Error,Out,runner>:
96  match allowed instance:
97    case False{} instance: Refused{world,instance,args}
98    case True{} Instance{namespace,id,name,access,local}: entered(~S,~C,~R,~E,~L,~Args,~Error,~Out,~runner,namespace,id,name,access,local,args,W.enter_run(~S,~C,~R,~E,world))

Uses (7)

Used by (1)