def BaseContext.state
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContextimport Base
3149# The state that goes with the base: the state received with an incoming
3150# context, or the state an outgoing context sends.
3151def BaseContext.state(base: BaseContext) -> TraceState:
3152 match base:
3153 case IncomingBase{incoming}:
3154 IncomingContext.state(incoming)
3155 case OutgoingBase{outgoing}:
3156 OutgoingContext.state(outgoing)