TraceContext.TraceParentV00.parse: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext Lines 467-478 of bend-trace-context@0.2.0.0/trace_context.bend: https://jend.leeeet.dev/read.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&start_line=467&end_line=478 import Base # Parse a strict traceparent v00 value: exactly "00-", 32 lowercase # hexadecimal digits, "-", 16 digits, "-" and two digits; the IDs must not be # all zero. No whitespace, case folding or suffix is accepted, and every flag # byte is kept as received. # This is the strict wire codec, not a complete W3C propagator: # TraceParent.read and Context.extract apply the processing rules of W3C 3.2.4 # and 4.1.2, such as reading later versions by their known prefix. # Laws: roundtrip, inverse and formatted_length. def TraceParentV00.parse(text: String) -> Result<&2, &2, Error, TraceParentV00>: do Result<&2, &2, Error, TraceParentV00>: version : Parsed<2n> <- Parse.digits(2n, text, 0n) Parse.start(version) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Parse.digits https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Parse.start https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Parsed https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceParentV00