def Parse.flags

bend-trace-context@0.2.0.0 · trace_context.bend:424

import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base
import bend-trace-context@0.2.0.0/src/digits.bend as Digits

424# The last field: the two flag digits, then the end of the text.
425def Parse.flags(trace_id: Digits.NonZero<32n>, parent_id: Digits.NonZero<16n>,
426  parsed: Parsed<2n>) -> Result<&2, &2, Error, TraceParentV00>:
427  match parsed:
428    case Parsed{flags, rest}:
429      do Result<&2, &2, Error, TraceParentV00>:
430        end : Unit <- Parse.end(rest)
431        return TraceParentV00{trace_id, parent_id, flags}

Uses (9)

Used by (1)