def reserve_id
bendvy-ecs-core@0.1.0.3 · world.bend:136
import bendvy-ecs-core@0.1.0.3/world.bend as World
import Base
import entity_allocator.bend as A
136
137
138def reserve_id(~S:Data,~C:Type,~R:Type,~E:Data,world:World<S,C,R,E>) -> World<S,C,R,E> & Reservation<S>:
139 match world:
140 case World{namespace,allocator,store,resource,events,pending,registrations,nextSystemId,clock,lifecycle}:reserve_join(~S,~C,~R,~E,namespace,store,resource,events,pending,registrations,nextSystemId,clock,A.reserve(allocator),lifecycle)