def phase_checked

bendvy-ecs-core@0.1.0.3 · world.bend:163

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

163def 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:
164  match checked:
165    case (world,False{}):(world,Rejected{MissingEntity{}})
166    case (World{namespace,allocator,store,resource,events,pending,registrations,nextSystemId,clock,lifecycle},True{}):(World{namespace,A.write_phase(allocator,key,phase),store,resource,events,pending,registrations,nextSystemId,clock,lifecycle},Accepted{})

Uses (9)

Used by (3)