def assign_checked
bendvy-ecs-core@0.1.0.3 · execution_lifetime_scope_store.bend:29
import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_store.bend as ExecutionLifetimeScopeStore
import Base
import bendvy-ecs-core@0.1.0.3/lifetime_scope.bend as Scope
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as Allocator
29def assign_checked(~S:Data,allowed:Bool,allocator:Allocator.Allocator,store:Store<S>,scope:Scope.Scope<S>,handle:W.Handle<S>) -> Allocator.Allocator & (Store<S> & Assignment<S>):
30 match allowed store handle:
31 case False{} store handle:(allocator,(store,AssignmentRefused{scope,handle,NamespaceMismatch{}}))
32 case True{} Store{namespace,members} W.Handle{+handleNamespace,+key}:assigned(~S,scope,W.Handle{handleNamespace,key},namespace,members,Allocator.checked(allocator,key,1))