def Send.of

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

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

3688# The message that a generated child gives: the child injected with the
3689# service's state, or the fallback.
3690def Send.of(+limits: Limits, +outgoing: OutgoingContext, received: Maybe<&2, IncomingContext>,
3691  +carrier: List<&2, Header>, result: Result<&2, &2, GenerationError, LocalContext>) -> Sent:
3692  match result:
3693    case Fail{error}:
3694      Send.fallback(limits, received, error, carrier)
3695    case Done{+operation}:
3696      Fresh{operation, Context.inject(limits, OutgoingContext.with_state(operation, OutgoingContext.state(outgoing)),
3697        carrier)}

Uses (14)

Used by (1)