def Context.child_from_id.checked

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

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

723# The child, unless the span ID was found equal to the parent's.
724def Context.child_from_id.checked(trace_id: TraceId, span_id: SpanId, sampled: Bool, reused: Bool) ->
725  Result<&2, &2, ContextError, LocalContext>:
726  match reused:
727    case True{}:
728      Fail{ReusedSpanId{}}
729    case False{}:
730      Done{Context.from_ids(trace_id, span_id, sampled)}

Uses (7)

Used by (1)