def swapped_previous

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

import bendvy-ecs-core@0.1.0.3/execution_command_publication.bend as ExecutionCommandPublication
import Base
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/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/chunk_column.bend as Column
import bendvy-ecs-core@0.1.0.3/execution_command_buffer.bend as Buffer

43def swapped_previous(~S:Data,~layout:Layout.Layout,~route:Layout.Route,allocator:A.Allocator,column:Column.Column<S,Layout.stored(layout,route)>,handle:W.Handle<S>,removing:Bool,previous:Maybe<&1,Layout.payload(layout,route)>) -> Applied<S,layout,route>:
44  match previous:
45    case None{}:Applied{allocator,column,Buffer.Applied{handle,None{}},False{}}
46    case Some{owner}:Applied{allocator,column,Buffer.Applied{handle,Some{owner}},removing}

Uses (11)

Used by (1)