def Step.result

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

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

1356# The result of a finished generation. A generation that has not finished
1357# would report the identifier it was drawing; the root_ends, child_ends and
1358# restart_ends laws show that the word budgets of the operations below make
1359# those cases unreachable.
1360def Step.result(step: Step) -> Result<&2, &2, GenerationError, LocalContext>:
1361  match step:
1362    case Created{context}:
1363      Done{context}
1364    case Failed{error}:
1365      Fail{error}
1366    case NeedWord{DrawTrace{draw, sampled}}:
1367      Fail{ExhaustedTraceId{}}
1368    case NeedWord{DrawSpan{draw, trace_id, sampled}}:
1369      Fail{ExhaustedSpanId{}}

Uses (5)

Used by (3)