Skip to main content

Module load

Module load 

Source
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 include may 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§

LoadOptions
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.