pub struct Options {
pub sources: Vec<Source>,
pub formats: Vec<FormatSpec>,
pub recursive: bool,
pub flat: bool,
pub dot_key: bool,
pub case_sensitive: bool,
pub order: Order,
pub tree: bool,
pub auto_files: bool,
pub ignore_unknown_ext: bool,
pub ignore_sheet_prefix: bool,
pub ignore_hidden_sheets: bool,
}Expand description
All loader options.
Plain data on purpose: set the fields you care about and take the rest
from ..Options::default().
Fields§
§sources: Vec<Source>The ordered config sources; later sources override earlier ones.
Default: the config folder under the current working directory.
formats: Vec<FormatSpec>Which formats to read and which extensions each one claims. The list carries no override-order semantics — it only builds the extension→format mapping (if several entries claim the same extension, the last entry wins the claim). Override order between files is decided by filename alone; see the merge rules in README.md.
recursive: boolMerge mode only (tree: false); folder sources. Scan
subdirectories too. Default false.
flat: boolMerge mode only, and only meaningful with
recursive: true. true (default): subfolder files merge as if
they sat at the top level — folder names carry no meaning.
false: each subfolder becomes a key and its files merge under
it. (The filename never becomes a key in merge mode; for
folder-and-filename keys use tree mode.)
dot_key: boolAll modes; env and table formats. Treat dotted keys as nested
paths: a.b.c becomes { "a": { "b": { "c": … } } }.
Default true.
case_sensitive: boolAll modes. Case-sensitive key merging. Default true; when
false, keys are normalized to lowercase. (File-extension
matching is always case-insensitive and unrelated to this
option.)
order: OrderAll modes; folder sources. Load order inside a folder. In
merge mode it decides which file overrides which; in tree mode it
decides key collisions (a.yml vs a folder a/).
tree: boolMode switch (requires the tree feature). false (default):
merge mode — a folder’s files deep-merge into one value. true:
tree mode — the folder’s shape becomes the value: every
subfolder is a key, and every file is a key named after the file
(extension stripped) holding that file’s parsed content —
a/b.json = {c:1} and d.json = {a:123} load as
{a: {b: {c: 1}}, d: {a: 123}}. Tree mode is always recursive;
recursive and flat do not apply to it.
auto_files: boolTree mode only. What to do with a file that has no
extension. true (default): read it and guess the type of its
(trimmed) content with the table auto rules — a file containing
1.1.1.1 becomes an IPv4 value when the ipv4 feature is on, a
string otherwise. false: treat it like a file with an unknown
extension (see ignore_unknown_ext).
(Named auto_files after the table auto type id it reuses.)
ignore_unknown_ext: boolTree mode only. What to do with a file whose extension no
active format claims: skip it (true, default) or fail the load
with Error::Parse (false). Merge mode always skips such
files.
ignore_sheet_prefix: boolSpreadsheet formats (excel/ods) only. Skip sheets whose name
starts with #, . or _ — draft/scratch space next to live
config. Default true. (A table source that names a sheet
explicitly bypasses this filter.)
Spreadsheet formats (excel/ods) only. Skip sheets marked
hidden in the workbook (Excel hidden/veryHidden, OpenDocument
table:display="false"). Default true. (A table source that
names a sheet explicitly bypasses this filter.)