def SpanDraw.feed

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

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

1188# Feed the next source word to a span ID draw, given as its three fields. A
1189# source error ends the draw at once with SourceFailure (law
1190# span_id_failure).
1191def SpanDraw.feed(word: Result<&1, &1, U32 & String, U32>, remaining: Nat, words: SpanWords,
1192  excluded: Maybe<&2, SpanId>) -> SpanStep:
1193  match word:
1194    case Fail{(code, message)}:
1195      SpanFailed{SourceFailure{code, message}}
1196    case Done{next}:
1197      SpanDraw.take(next, remaining, words, excluded)

Uses (12)

Used by (1)