def TraceId.to_bytes
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContextimport Base
import bend-trace-context@0.2.0.0/src/digits.bend as Digits
876# The 16 bytes of the trace ID, most significant first, in Base's byte
877# convention, that of TCP.send_bytes and TCP.recv_bytes: one U32 cell from 0
878# to 255 per byte. The first byte holds the ID's first two digits, the first
879# of them high. The randomness assertion is not part of the bytes (laws
880# trace_bytes, trace_bytes_roundtrip and trace_bytes_injective).
881def TraceId.to_bytes(id: TraceId) -> List<&2, U32>:
882 match id:
883 case TraceId{value, random}:
884 Digits.Digits.to_bytes(16n, Digits.NonZero.digits(32n, value))
Uses (5)
Used by (0)
No other definition uses this definition.