def admitted

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

import bendvy-ecs-core@0.1.0.4/restore_leaf.bend as RestoreLeaf
import Base
import bendvy-ecs-core@0.1.0.4/persistence_declaration.bend as Persistence
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
import bendvy-ecs-core@0.1.0.4/ordinary_declaration.bend as Identity

29def admitted(~S:Data,~I:Type,~P:Type,~Custom:Data,~identity:Identity.Declaration<S,P>,~project:P -> P & D.Raw,declaration:Persistence.Constructed<S,P,identity,project>,result:Build.Construction<I,P,Constructor.Error<Custom>>) -> Build.Construction<I,P,Constructor.Error<Custom>>:
30  match result:
31    case Build.Invalid{owner,error}:Build.Invalid{owner,error}
32    case Build.Constructed{owner,undo}:stored(~I,~P,~Custom,undo,Persistence.validate(~S,~P,~identity,~project,declaration,owner))

Uses (8)

Used by (1)