Module nix_compat::aterm::parser
source Β· Expand description
This module implements parsing code for some basic building blocks of the ATerm format, which is used by C++ Nix to serialize Derivations.
Functions§
- parse_bytes_field πParse a field in double quotes, undo any escaping, and return the unquoted and decoded
Vec<u8>
. - parse_escaped_bytes πParse a bstr and undo any escaping (which is why this needs to allocate).
- parse_string_field πParse a field in double quotes, undo any escaping, and return the unquoted and decoded String, if itβs valid UTF-8. Or fail parsing if the bytes are no valid UTF-8.
- parse_string_list πParse a list of string fields (enclosed in brackets)