def Parse.start

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

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

456# After the two version digits: the version check, the "-" at offset 2 and the
457# trace ID from offset 3.
458def Parse.start(parsed: Parsed<2n>) -> Result<&2, &2, Error, TraceParentV00>:
459  match parsed:
460    case Parsed{version, rest}:
461      do Result<&2, &2, Error, TraceParentV00>:
462        version_ok : Unit <- Parse.version(version)
463        after : String <- Parse.separator(rest, 2n)
464        trace : Parsed<32n> <- Parse.digits(32n, after, 3n)
465        Parse.trace(trace)

Uses (11)

Used by (1)