TraceContext.TraceId.to_bytes: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext Lines 876-884 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=876&end_line=884 import Base import bend-trace-context@0.2.0.0/src/digits.bend as Digits # The 16 bytes of the trace ID, most significant first, in Base's byte # convention, that of TCP.send_bytes and TCP.recv_bytes: one U32 cell from 0 # to 255 per byte. The first byte holds the ID's first two digits, the first # of them high. The randomness assertion is not part of the bytes (laws # trace_bytes, trace_bytes_roundtrip and trace_bytes_injective). def TraceId.to_bytes(id: TraceId) -> List<&2, U32>: match id: case TraceId{value, random}: Digits.Digits.to_bytes(16n, Digits.NonZero.digits(32n, value)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/src/digits.bend&name=Digits.to_bytes https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/src/digits.bend&name=NonZero.digits https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceId