fn required_text(
pairs: &[(Value, Value)],
key: &str,
label: &str,
) -> Result<String, MoqTraceError>Expand description
Read a required text key, distinguishing “absent” from “present and not text”.
Both are malformed — there is no header to construct without the key — but
they are different faults, and reporting a "perspective": 5 as a missing
"perspective" sends whoever has to fix the file looking for something
that is right in front of them. label names the key as a reader of the
file would find it, which for a key inside "segment" is not its bare
name.