Expand description
§Options for loading configuration
LoadOptions holds the limits and the include policy that every load
applies. The defaults are safe for files the application owns:
- files larger than 16 MiB, and anything that is not a regular file (a directory, a FIFO, a device), are refused;
- NOML
includemay only read files inside the directory of the file being loaded (or the current directory, for text); - NOML
${...}references may expand the document to at most 64 MiB, with at most 10,000 references and chains at most 32 references deep.
LoadOptions::strict turns on strict NOML for files and hot reload as
well: include and env() are refused (see
Config::from_string_strict).
Since v1.4.0.
Structs§
- Load
Options - Limits and include policy for loading configuration.
Constants§
- DEFAULT_
MAX_ EXPANDED_ SIZE - Default largest size a NOML document may expand to through
${...}: 64 MiB. - DEFAULT_
MAX_ EXPANSIONS - Default largest number of
${...}references in one NOML document. - DEFAULT_
MAX_ EXPANSION_ DEPTH - Default longest chain of
${...}references (a reference to a value that is itself a reference, and so on). - DEFAULT_
MAX_ FILE_ SIZE - Default largest configuration file read: 16 MiB.
- DEFAULT_
MAX_ INCLUDES - Default largest number of files a NOML document may include, counted over every level.