def validate

bendvy-ecs-core@0.1.0.3 · decode_data.bend:172

import bendvy-ecs-core@0.1.0.3/decode_data.bend as DecodeData
import Base

172def validate(fuel:Nat,step:Step,+original:Raw) -> Checked:
173  match fuel step:
174    case _ Stop{error}: Rejected{error}
175    case _ Continue{[]}: Accepted{original}
176    case 0n Continue{Work{_,_,path} <> _}: Rejected{FuelExhausted{path}}
177    case 1n+more Continue{Work{codec,raw,path} <> rest}: validate(more,expand(codec,raw,path,rest),original)

Uses (8)

Used by (2)