def Parse.id

bend-trace-context@0.2.0.0 · trace_context.bend:525

import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base
import bend-trace-context@0.2.0.0/src/digits.bend as Digits

525# A supplied ID is exactly n lowercase hexadecimal digits, not all zero.
526def Parse.id(+n: Nat, text: String, field: Field) ->
527  Result<&2, &2, Error, Digits.NonZero<n>>:
528  do Result<&2, &2, Error, Digits.NonZero<n>>:
529    parsed : Parsed<n> <- Parse.digits(n, text, 0n)
530    Parse.id.finish(n, parsed, field)

Uses (10)

Used by (2)