Skip to main content

parse_position

Function parse_position 

Source
fn parse_position(raw: &str, span: Option<Range<usize>>) -> String
Expand description

Where a parse failure sits in the document, from the byte span the error carries: at line N, column M in <key>, or empty when it names no span - no position rather than a confident line 1.

The key is the text left of that line’s = when that text is shaped like a bare key (serde’s own words do not name it for a value error, and the snippet that used to is gone). A line with no = - a malformed array element, a bare value - names nothing rather than quoting whatever sits there as a key: the text right of the = is the value, and it never prints.