def checked

bendvy-ecs-core@0.1.0.3 · decode_construction.bend:15

import bendvy-ecs-core@0.1.0.3/decode_construction.bend as DecodeConstruction
import Base
import decode_data.bend as D
import bundle_construction.bend as Build

15def checked(~I:Type,~P:Type,~build:I -> D.Raw -> Build.Construction<I,P,D.Error>,receipt:D.Receipt<I>) -> Build.Construction<I,P,D.Error>:
16  match receipt:
17    case D.Receipt{owner,D.Rejected{error}}:Build.Invalid{owner,error}
18    case D.Receipt{owner,D.Accepted{canonical}}:build(owner,canonical)

Uses (5)

Used by (1)