def swapped

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

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

47def swapped(~S:Data,~layout:Layout.Layout,~route:Layout.Route,allocator:A.Allocator,handle:W.Handle<S>,result:Column.SwapOutcome<S,Layout.stored(layout,route)>,removing:Bool) -> Applied<S,layout,route>:
48  match result:
49    case Column.Accepted{column,previous}:swapped_previous(~S,~layout,~route,allocator,column,handle,removing,unwrap(~(Layout.payload(layout,route)),~(Layout.view(layout,route)),previous))
50    case Column.Rejected{column,incoming}:Applied{allocator,column,Buffer.Refused{handle,unwrap(~(Layout.payload(layout,route)),~(Layout.view(layout,route)),incoming)},False{}}

Uses (13)

Used by (2)