def Serve.from_start
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContextimport Base
3518# The service that a new trace gives: its generated operation, whose sampled
3519# indication Serve.new_trace_sampled gave its generation, and no state, or
3520# Untraced with the error. A new trace keeps no received pair.
3521def Serve.from_start(origin: Origin, result: Result<&2, &2, GenerationError, LocalContext>) -> Service:
3522 match result:
3523 case Fail{error}:
3524 Untraced{error, None{}}
3525 case Done{context}:
3526 Operating{origin, OutgoingContext.new(context), None{}}