def assign

bendvy-ecs-core@0.1.0.3 · execution_lifetime_scope_store.bend:33

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

33def assign(~S:Data,+actual:U32,allocator:Allocator.Allocator,store:Store<S>,scope:Scope.Scope<S>,handle:W.Handle<S>) -> Allocator.Allocator & (Store<S> & Assignment<S>):
34  match store scope handle:
35    case Store{+namespace,members} Scope.Scope{+scopeNamespace,+name} W.Handle{+handleNamespace,+key}:assign_checked(~S,Bool.and(U32.is_eq(actual,namespace),Bool.and(U32.is_eq(actual,scopeNamespace),U32.is_eq(actual,handleNamespace))),allocator,Store{namespace,members},Scope.Scope{scopeNamespace,name},W.Handle{handleNamespace,key})

Uses (10)

Used by (1)