def target_checked
bendvy-ecs-core@0.1.0.3 · execution_relation_access.bend:48
import bendvy-ecs-core@0.1.0.3/execution_relation_access.bend as ExecutionRelationAccess
import Base
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/execution_relation_store.bend as Store
import bendvy-ecs-core@0.1.0.3/execution_state.bend as State
48def target_checked(~S:Data,~descriptor:T.Descriptor<S>,~C:Type,~R:Type,~view:State.Scope<S,C,R> -> State.Scope<S,C,R> & Store.View<S,descriptor>,valid:Bool,expected:U32,scope:State.Scope<S,C,R>,source:W.Handle<S>) -> State.Scope<S,C,R> & Lookup<Maybe<&2,W.Handle<S>>>:
49 match valid:
50 case False{}:(scope,MissingEntity{})
51 case True{}:target_returned(~S,~descriptor,~State.Scope<S,C,R>,expected,source,view(scope))