Macro env_inventory::register
source · macro_rules! register { ($($var:expr),* $(,)?) => { ... }; }
Expand description
Registers one or more environment variables for tracking and validation.
This macro simplifies the process of registering environment variables that
your application depends on. Once registered, you can utilize
env-inventory’s utilities to load, validate, and manage these environment
variables.
Examples
register!("DATABASE_URL", "REDIS_URL", "API_KEY");The above registers three environment variables: DATABASE_URL,
REDIS_URL, and API_KEY.
Parameters
$($var:expr),*: A comma-separated list of string literals, each representing an environment variable to register.
Panics
This macro will panic at compile-time if any of the provided arguments are not string literals.