Skip to main content

field

Function field 

Source
pub fn field<'a>(payload: &'a str, name: &str) -> Option<&'a str>
Expand description

Read a payload field BY PREFIX, never by line position: the payload has grown a line once already (v1 -> v2 added platform), and a positional reader silently mis-assigns every field after an insertion rather than failing. First match wins, so a second gates line cannot smuggle a value past the caller.

Byte-strict, like verify.sh: lines are split on LF only and nothing is trimmed but the separating spaces, so a \r or a trailing space is part of the value and a tree line that carries one matches nothing.