RecoverableComponent.restored: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/recoverable_component.bend as RecoverableComponent Lines 31-37 of bendvy-ecs-core@0.1.0.4/recoverable_component.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/recoverable_component.bend&start_line=31&end_line=37 import Base import entity_key.bend as Key import bendvy-ecs-core@0.1.0.4/world.bend as W import bendvy-ecs-core@0.1.0.4/column.bend as Col import bendvy-ecs-core@0.1.0.4/lifecycle.bend as Life def restored(~S:Data,~P:Type,+handle:W.Handle,stamp:Life.Stamp,released:Life.Stamp,result:Col.SwapOutcome) -> Col.Column & Record: match handle result: case W.Handle{_,Key.EntityKey{id,_}},Col.Accepted{column,payload}:(Col.restore_stamp(~S,~P,column,id,stamp),Record{handle,released,payload}) # For a saved ordinary record, ensure covers its positive live id, hence # swap accepts. Raw rejection returns the untouched incoming owner/record; # it does not claim that a different payload was displaced. case W.Handle{_,Key.EntityKey{id,_}},Col.Rejected{column,payload}:(column,Record{handle,stamp,payload}) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/column.bend&name=Column https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/column.bend&name=SwapOutcome https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/column.bend&name=restore_stamp https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/entity_key.bend&name=Key https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/lifecycle.bend&name=Stamp https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/recoverable_component.bend&name=Record https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=Handle