def str_len_in

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

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

361# The same bounds as ready-made rules: a project's rule calls them by tag
362# (`case 0n: str_len_in(1n, 64n, r)`), since a tag carries no numbers. Each
363# refuses only the value it is about -- a string, a number -- and leaves any
364# other kind to the schema's own check; the constructors below read the tests
365# directly, because their bound is in the schema.
366def str_len_in(+lo: Nat, +hi: Nat, r: Raw) -> Maybe<&2, Err>:
367  match r:
368    case RStr{+x}:
369      in_err(str_len_ok(lo, hi, x), LengthNotIn{lo, hi})
370    case _:
371      None{}

Uses (7)

Used by (0)

No other definition uses this definition.