Thanks to visit codestin.com
Credit goes to lib.rs

Cargo Features

[dependencies]
procenv = { version = "0.1.15", default-features = false, features = ["secrecy", "clap", "validator", "dotenv", "serde", "tracing", "async", "provider", "watch", "watch-async", "file", "toml", "yaml", "json", "file-all", "full"] }
default = dotenv

The dotenv feature is set by default whenever procenv is added without default-features = false somewhere in the dependency tree.

secrecy full?

Enable secrecy::Secret<T> support for secret fields

Enables secrecy

clap full?

Enable clap integration for CLI + env config

Enables clap

Affects diagnostic_codes::CLI_ERROR

validator full?

Enable validation attributes

Enables validator

Affects diagnostic_codes::VALIDATION_ERROR, diagnostic_codes::FIELD_VALIDATION_ERROR

dotenv default full?

Enable .env file loading (Phase 9)

Enables dotenvy

serde file? full?

Enable serde serialization for config structs

Enables serde and serde_json

tracing full?

Enable tracing instrumentation

Enables tracing

async watch-async? = provider

Enables futures and tokio

Affects adapter::BlockingAdapter, provider::BoxFuture, provider::AsyncProvider

provider async? full?
watch watch-async? = file

Hot reload support (Phase E)

Enables crossbeam-channel, notify, and parking_lot

notify:

Hot reload (Phase E)

Affects procenv::watch

watch-async = async, watch
file json? toml? watch? yaml? = serde

File format support (Phase 13)
Enable file-based configuration loading

Enables serde_path_to_error

Affects diagnostic_codes::FILE_NOT_FOUND, diagnostic_codes::FILE_PARSE_ERROR, diagnostic_codes::FILE_MISSING_FIELD, diagnostic_codes::FILE_TYPE_ERROR, procenv::file

toml file-all? = file

Enable TOML file support

Enables toml ^0.9.8

yaml file-all? = file

Enable YAML file support (uses serde-saphyr, the modern serde_yaml replacement)

Enables serde-saphyr ^0.0.10

json file-all? = file

Enable JSON file support (included in file feature)

file-all full? = json, toml, yaml

Enable all file formats

full = clap, dotenv, file-all, provider, secrecy, serde, tracing, validator

Enable all features