def stored

bendvy-ecs-core@0.1.0.4 · restore_leaf.bend:25

import bendvy-ecs-core@0.1.0.4/restore_leaf.bend as RestoreLeaf
import Base
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/decode_construction.bend as Constructor
import bendvy-ecs-core@0.1.0.4/bundle_construction.bend as Build

25def stored(~I:Type,~P:Type,~Custom:Data,undo:P -> I,receipt:D.Receipt<P>) -> Build.Construction<I,P,Constructor.Error<Custom>>:
26  match receipt:
27    case D.Receipt{owner,D.Accepted{_}}:Build.Constructed{owner,undo}
28    case D.Receipt{owner,D.Rejected{error}}:Build.Invalid{undo(owner),Constructor.Validation{error}}

Uses (4)

Used by (1)