def despawn_returned

bendvy-ecs-core@0.1.0.3 · execution_command_publication.bend:91

import bendvy-ecs-core@0.1.0.3/execution_command_publication.bend as ExecutionCommandPublication
import Base
import bendvy-ecs-core@0.1.0.3/execution_lifecycle_notices.bend as Notice
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as A
import bendvy-ecs-core@0.1.0.3/clock_state.bend as Clock
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.3/deferred_command.bend as Deferred
import bendvy-ecs-core@0.1.0.3/execution_command_buffer.bend as Buffer

91# Bevy ad678262 system/commands/mod.rs EntityCommands::despawn queues a handled
92# entity command; world/mod.rs despawn_with_caller refuses a missing entity and
93# despawn removes all components before freeing its index. This boundary also
94# returns each actual affine payload instead of dropping it.
95def despawn_returned(-S:Data,-C:Type,-R:Type,-E:Data,-P:Type,-D:Type,namespace:U32,resource:R,events:List<&2,E>,pending:List<Deferred.Command<W.World<S,C,R,E>>>,registrations:List<&2,W.RegistrationMeta>,nextSystemId:U32,clock:Clock.State,allocator:A.Allocator,store:C,+handle:W.Handle<S>,tick:Tick.Tick,despawned:Notice.Identity<S> -> Tick.Tick -> Notice.Journal<S> -> Notice.Journal<S>,result:Notice.Journal<S> & D) -> W.World<S,C,R,E> & Buffer.Receipt<S,P,D>:
96  match handle result:
97    case W.Handle{+handleNamespace,+key}, (journal,removed):(W.World{namespace,A.release(A.write_phase(allocator,key,A.DeadRetained{}),key),store,resource,events,pending,registrations,nextSystemId,clock,despawned(Notice.Identity{handleNamespace,key},tick,journal)},Buffer.Despawned{W.Handle{handleNamespace,key},removed})

Uses (17)

Used by (1)