adotenv-config
A config source adapter for literal
adotenv documents.
use parse_strict;
use AdotenvSource;
let doc = parse_strict?;
let config = builder
.add_source
.build?;
assert_eq!;
assert_eq!;
from_values accepts an explicit map. Enable the load feature to use
from_environment with a LoadedEnvironment.
Key semantics
config owns key normalization. It lowercases names and interprets . as a
nested path separator. Thus .env keys A.B and a.b collide, and A.B
becomes a nested a.b table rather than a literal flat key. The adapter does
not escape or rewrite keys; use from_values for already normalized config
keys.
Values are decoded literal strings. Duplicate policy, nonparticipating keys and
BareKeys::Empty follow the wrapped document or loaded environment. No
expansion, command execution or implicit file access occurs.
This crate is built against config 0.14, which supports the workspace MSRV of
Rust 1.81. It is part of the
adotenv workspace.