def Draw.feed

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

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

1335# Feed the next source word, or the source's error, to the trace ID draw or
1336# the span ID draw that the generation runs. A source error ends the draw,
1337# and so the generation, at once with SourceFailure (law feed_failure).
1338def Draw.feed(word: Result<&1, &1, U32 & String, U32>, draw: Draw) -> Step:
1339  match draw:
1340    case DrawTrace{trace, sampled}:
1341      Step.of_trace(TraceDraw.next(word, trace), sampled)
1342    case DrawSpan{span, trace_id, sampled}:
1343      Step.of_span(SpanDraw.next(word, span), trace_id, sampled)

Uses (10)

Used by (3)