Skip to main content

parse_dictionary

Function parse_dictionary 

pub fn parse_dictionary<'a>(
    input: &'a [u8],
    visit: impl FnMut(&'a str, DictionaryValue<'a>),
) -> Result<(), ParseError>
Available on crate features http and std only.
Expand description

Validate a complete dictionary, projecting each member into visit in wire order.

Duplicate keys are visited repeatedly; consumers must replace earlier values. Callbacks can occur before a later syntax error: discard their results on error. Combine multiple HTTP field lines with commas before calling this function.