Component.replace: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/component.bend as Component Lines 157-163 of bendvy-ecs-core@0.1.0.3/component.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/component.bend&start_line=157&end_line=163 import Base import column.bend as Col import world.bend as W # Ordinary writes require a live entity. Foreign handles are rejected before # any column access, size computation, allocation or owned replacement move. # Immediately insert/replace with Some(C), or remove with None, on a live handle. # Return displaced C on success and incoming C on rejection; capacity errors # remain explicit. This operation is not deferred and has no automatic undo journal. def replace(~S: Data,~Store: Type,~R: Type,~E: Data,~Rest: Type,~C: Type,~V: Data,~Token: Data,~take: Store -> Rest & Col.Column,~put: Rest -> Col.Column -> Store,~project: C -> C & V,family: Family,world: W.World,+handle: W.Handle,incoming: Maybe<&1,C>) -> Replacement,C>: replace_allowed(~S,~Store,~R,~E,~Rest,~C,~V,~Token,~take,~put,~project,W.valid(~S,~Store,~R,~E,world,handle),handle,incoming) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/column.bend&name=Column https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/component.bend&name=Family https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/component.bend&name=Replacement https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/component.bend&name=replace_allowed https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/world.bend&name=Handle https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/world.bend&name=World https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/world.bend&name=valid