TraceContext.TraceParentV00.format: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext Lines 480-489 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=480&end_line=489 import Base import bend-trace-context@0.2.0.0/src/digits.bend as Digits # The text of a strict v00 value: always 55 characters. It is total, because # validity is carried by the argument's type, and it preserves every flag bit: # it is the exact inverse of parse, not an outgoing-header policy (see # LocalContext.to_traceparent for what a participant emits). def TraceParentV00.format(context: TraceParentV00) -> String: match context: case TraceParentV00{trace_id, parent_id, flags}: "00-" ++ Digits.NonZero.to_string(32n, trace_id) ++ "-" ++ Digits.NonZero.to_string(16n, parent_id) ++ "-" ++ Digits.Digits.to_string(2n, flags) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/src/digits.bend&name=Digits.to_string https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/src/digits.bend&name=NonZero.to_string https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceParentV00