def replaced
bendvy-ecs-core@0.1.0.3 · execution_recoverable_component.bend:44
import bendvy-ecs-core@0.1.0.3/execution_recoverable_component.bend as ExecutionRecoverableComponent
import Base
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/recoverable_component.bend as RC
44def replaced(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,handle:W.Handle<S>,result:W.World<S,C,R,E> & Exchange<P>) -> RC.Replacement<W.World<S,C,R,E>,S,P>:
45 match result:
46 case (world,Exchanged{stamp,previous}):RC.Applied{world,RC.Record{handle,stamp,previous}}
47 case (world,ExchangeRefused{incoming}):RC.Refused{world,incoming,W.CapacityExceeded{}}