adotenv-figment
A figment provider for literal
adotenv documents.
use parse_strict;
use AdotenvProvider;
use Figment;
let doc = parse_strict?;
let figment = new.merge;
from_values accepts an explicit map. The load feature adds from_environment
for LoadedEnvironment.
Values and keys
The provider uses Profile::Default and keeps original key spelling. Figment's
path lookups still treat dots as separators. Extract into a literal map or a
matching typed structure when dots are part of a key.
Values are strings. Deserialize string fields and convert numbers or booleans explicitly.
use Deserialize;
let raw: RawApp = new
.merge
.extract?;
let port: u16 = raw.port.parse?;
Duplicate policy, lookup participation and BareKeys::Empty follow the source
document or loaded environment. The adapter performs no expansion, command
execution or file access.
The crate supports Rust 1.81.