def restore_leaf

bendvy-ecs-core@0.1.0.3 · chunk_column.bend:204

import bendvy-ecs-core@0.1.0.3/chunk_column.bend as ChunkColumn
import Base
import bendvy-ecs-core@0.1.0.3/lifecycle.bend as L

204# Trusted recovery restores the recorded stamp without changing payload owners.
205def restore_leaf(~S:Data,~C:Type,values:Array<Maybe<&1,C>>,stamps:Array<L.Stamp>,index:U32,stamp:L.Stamp,valid:Bool) -> Column<S,C>:
206  match valid:
207    case False{}:Leaf{values,stamps}
208    case True{}:Leaf{values,Array.set(L.Stamp,stamps,index,stamp)}

Uses (7)

Used by (1)