def SpanId.parse

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

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

565# Parse a supplied span ID: exactly 16 lowercase hexadecimal digits, not all
566# zero (laws span_id_parse and span_id_roundtrip).
567def SpanId.parse(text: String) -> Result<&2, &2, Error, SpanId>:
568  do Result<&2, &2, Error, SpanId>:
569    value : Digits.NonZero<16n> <- Parse.id(16n, text, SpanIdField{})
570    return SpanId{value}

Uses (9)

Used by (0)

No other definition uses this definition.