def TraceDraw.feed

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

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

1070# Feed the next source word to a trace ID draw, given as its three fields. A
1071# source error ends the draw at once with SourceFailure (law
1072# trace_id_failure).
1073def TraceDraw.feed(word: Result<&1, &1, U32 & String, U32>, remaining: Nat, words: TraceWords,
1074  excluded: Maybe<&2, TraceId>) -> TraceStep:
1075  match word:
1076    case Fail{(code, message)}:
1077      TraceFailed{SourceFailure{code, message}}
1078    case Done{next}:
1079      TraceDraw.take(next, remaining, words, excluded)

Uses (12)

Used by (1)