ApplicationConfig
Every configuration entry becomes a field in ApplicationConfig,
a code-generated struct in the server SDK crate that represents
the entire set of configuration options for your application.
// [...]
#[derive(Debug, Clone, serde::Deserialize)]
pub struct ApplicationConfig {
pub postgres: configuration::postgres::PostgresConfig,
pub server: configuration::server::ServerConfig,
}
Usage
ApplicationConfig is used as the generic parameter for ConfigLoader::load
when assembling the configuration as the application starts.
You can also use ApplicationConfig as the source of truth to determine the names of
environment variables and
the expected schema for configuration files.
Other than that, you won't need to interact with ApplicationConfig directly
unless you're implementing a custom configuration loading mechanism.