def Context.restart_with

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

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

1541# A generated restart replacing `previous` from a caller's source: a trace ID
1542# that excludes the received one, then a span ID, as for a root, with the
1543# sampled indication `sampled` (TracePlan.restart and
1544# TracePlan.generate_with). It reads at most 48 words. Laws:
1545# restart_composed, restart_tape, restart_ends and generated_restart.
1546def Context.restart_with(~S: Type, ~read: S -> IO(S & Result<&1, &1, U32 & String, U32>), source: S,
1547  previous: RemoteContext, sampled: Bool) -> IO(S & Result<&2, &2, GenerationError, LocalContext>):
1548  TracePlan.generate_with(~S, ~read, source, TracePlan.restart(previous, sampled))

Uses (11)

Used by (1)