def cancel_pending

bendvy-ecs-core@0.1.0.4 · restore_world.bend:7

import bendvy-ecs-core@0.1.0.4/restore_world.bend as RestoreWorld
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/entity_allocator.bend as Alloc

7# Internal owner adapter. Pending commands are discarded, never invoked.
8# The namespace, live payload owners and registration cursors are preserved.
9def cancel_pending(~S:Data,~C:Type,~R:Type,~E:Data,world:W.World<S,C,R,E>) -> W.World<S,C,R,E>:
10  match world:
11    case W.World{namespace,allocator,store,resource,events,_,registrations,nextSystemId,clock}:W.World{namespace,Alloc.abandon_pending(allocator),store,resource,events,[],registrations,nextSystemId,clock}

Uses (3)

Used by (1)