def phase_checked

bendvy-ecs-core@0.1.0.4 · world.bend:161

import bendvy-ecs-core@0.1.0.4/world.bend as World
import Base
import entity_key.bend as K
import entity_allocator.bend as A

161def phase_checked(~S:Data,~C:Type,~R:Type,~E:Data,phase:A.Phase,key:K.Key,checked:World<S,C,R,E> & Bool) -> World<S,C,R,E> & Status:
162  match checked:
163    case (world,False{}):(world,Rejected{MissingEntity{}})
164    case (World{namespace,allocator,store,resource,events,pending,registrations,nextSystemId,clock},True{}):(World{namespace,A.write_phase(allocator,key,phase),store,resource,events,pending,registrations,nextSystemId,clock},Accepted{})

Uses (9)

Used by (3)