def Context.restart_from_ids.checked
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContextimport Base
742# The restarted root, unless the trace ID was found equal to the received one.
743def Context.restart_from_ids.checked(trace_id: TraceId, span_id: SpanId, sampled: Bool, reused: Bool) ->
744 Result<&2, &2, ContextError, LocalContext>:
745 match reused:
746 case True{}:
747 Fail{ReusedTraceId{}}
748 case False{}:
749 Done{Context.root_from_ids(trace_id, span_id, sampled)}