def SpanId.from_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
907# Read a span ID from exactly 8 bytes, most significant first, with the rules
908# and errors of TraceId.from_bytes. Laws: span_bytes_inverse,
909# span_bytes_short, span_bytes_long, span_bytes_above, zero_bytes and
910# span_bytes_accepts.
911def SpanId.from_bytes(bytes: List<&2, U32>) -> Result<&2, &2, Error, SpanId>:
912 do Result<&2, &2, Error, SpanId>:
913 value : Digits.NonZero<16n> <- Parse.id_bytes(8n, bytes, SpanIdField{})
914 return SpanId{value}
Uses (10)
Used by (0)
No other definition uses this definition.