#[derive(EnvConfig)] — see cli_engine::env_config for the trait and
runtime pieces this macro's generated code calls into.
Per-field #[env_config(...)] attributes:
key = "..."— TOML key to look up (default: the field's Rust name).env = "SUFFIX"— opt-in environment-variable suffix.default = <expr>— literal fallback of the field's own type.default_fn = <path>—fn(&SourceChain<'_>) -> T, computed lazily.from_toml = <path>—fn(&cli_engine::env_config::toml::Value) -> Result<T, String>, replaces the defaultT: DeserializeOwnedconversion. Name the parameter type throughcli_engine::env_config::toml(re-exported) rather than a directtomldependency of your own, so your crate doesn't need to track cli-engine'stomlversion.from_env = <path>—fn(&str) -> Result<T, String>, replaces the defaultT: FromStrconversion.to_toml = <path>—fn(T) -> cli_engine::env_config::toml::Value, replaces the defaultT: Into<toml::Value>conversion used when building anEnvTablefrom an instance (seeimpl From<Self> for EnvTable, generated alongsideEnvConfigso a compiled-in environment can be registered as a plain struct value viaEnvironments::with_environment).allow_blank— bare marker (no value); by default, a source that answers with an empty-or-whitespace-only string, or an empty TOML array, is treated as not having answered at all, so the field keeps looking at the rest of theSourceChain(and ultimately falls todefault/default_fn) instead of accepting""/[]literally. This default fits nearly every field: a blank or empty override is essentially always a mistake or an unset placeholder, never a real value. Setallow_blankon the rare field where an explicit""or[]is itself a meaningful, literal answer distinct from "unset."
default and default_fn are mutually exclusive.