TraceContext.Limits.is_valid: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext Lines 1626-1633 of bend-trace-context@0.2.0.0/trace_context.bend: https://jend.leeeet.dev/read.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&start_line=1626&end_line=1633 import Base # The rules of a configuration, which must accept its own emitted # representation: a traceparent input budget of at least 55 octets, the length # of a v00 value, and a tracestate input budget no smaller than an output # budget of at least 512 octets (spec #1, "Tracestate policy and resource # bounds"; the 512-octet minimum comes from #8; law limits_bounds). def Limits.is_valid(traceparent_input: Nat, tracestate_input: Nat, +tracestate_output: Nat) -> Bool: Bool.and(Nat.is_ge(traceparent_input, 55n), Bool.and(Nat.is_ge(tracestate_output, 512n), Nat.is_ge(tracestate_input, tracestate_output))) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_ge