def present_conform

bend-schema-lib@0.4.1.0 · core.bend:1356

import bend-schema-lib@0.4.1.0/core.bend as Core
import Base

1356def present_conform(~rule: Nat -> Raw -> Maybe<&2, Err>, +s: Schema, +r: Raw) -> Bool:
1357  match s:
1358    case SVariant{+n, vs, rest}:
1359      pick_bool(is_missing(lookup(n, r)), present_conform(~rule, rest, r), Bool.and(key_once(n, r), Bool.and(conforms(~rule, vs, lookup(n, r), None{}), present_conform(~rule, rest, r))))
1360    case _:
1361      True{}

Uses (12)

Used by (0)

No other definition uses this definition.