TraceContext.Read.extension: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext Lines 2858-2872 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=2858&end_line=2872 import Base # What may follow the flags of a later version: the end of the value, or a # dash that starts fields this version does not know. Those fields are not # read (W3C 3.2.4: "Vendors MUST NOT parse or assume anything about unknown # fields"), except that a control character in them is refused with # ControlCharacter at its offset: no field value may hold one (RFC 9110, # section 5.5), and a value forwarded unchanged must not end a message's # field. Any other character than a dash at offset 55 is ExpectedSeparator. def Read.extension(rest: String) -> Result<&2, &2, Error, Unit>: match rest: case SNil{}: Done{Unit{}} case SCon{char, tail}: do Result<&2, &2, Error, Unit>: unknown : String <- Parse.separator_result(tail, Char.is_eq(char, '-'), 55n) Read.clean(Text.control.go(unknown, 56n, None{})) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Parse.separator_result https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Read.clean https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Text.control.go