Function nix_compat::derivation::parser::parse_kv

source ยท
pub(crate) fn parse_kv<'a, V, VF>(
    vf: VF,
) -> impl FnMut(&'a [u8]) -> IResult<&'a [u8], BTreeMap<String, V>, NomError<&'a [u8]>> + 'static
where VF: FnMut(&'a [u8]) -> IResult<&'a [u8], V, Error<&'a [u8]>> + Clone + 'static,
Expand description

Parse a list of key/value pairs into a BTreeMap. The parser for the values can be passed in. In terms of ATerm, this is just a 2-tuple, but we have the additional restriction that the first element needs to be unique across all tuples.