def Read.within
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContextimport Base
2922# A value within its budget is read without the optional whitespace around
2923# it; a value over the budget is refused without being read further.
2924def Read.within(fits: Maybe<&2, Nat>, value: String) -> Result<&2, &2, TraceParentError, TraceParentV00>:
2925 match fits:
2926 case None{}:
2927 Fail{TraceParentTooLarge{}}
2928 case Some{left}:
2929 Read.trimmed(Text.trim_ows(value))