def Service.set

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

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

3810# Add or update an entry of the state that the service's operation sends,
3811# such as this participant's own (see OutgoingContext.set). A service
3812# without an operation is unchanged: it sends no state of its own.
3813def Service.set(service: Service, key: StateKey, value: StateValue) -> Service:
3814  match service:
3815    case Operating{origin, outgoing, received}:
3816      Operating{origin, OutgoingContext.set(outgoing, key, value), received}
3817    case Untraced{error, received}:
3818      Untraced{error, received}

Uses (4)

Used by (0)

No other definition uses this definition.