def Read.single

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

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

2909# A value that joins several with a comma is refused as repeated fields; any
2910# other value is read by the rules of its version.
2911def Read.single(combined: Bool, text: String) -> Result<&2, &2, TraceParentError, TraceParentV00>:
2912  match combined:
2913    case True{}:
2914      Fail{RepeatedTraceParent{}}
2915    case False{}:
2916      Read.invalid(Read.known(text))

Uses (7)

Used by (1)