Module 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)