Skip to main content

Module config

Module config 

Source
Expand description

Per-environment application configuration loaded from config/<env>.yml.

Config is a trait so applications can supply their own backing store; YamlConfig is the default implementation that deserializes the YAML file for the environment reported by Environment::get_env.

Structs§

LoggerConfig
Re-exported so config::LoggerConfig resolves; the logger config lives in doido-core alongside the logger it drives. Logging settings, deserialized from the logger section of config/<env>.yml.
ServerConfig
Server bind settings. The listen address is the bind IP joined with port (e.g. 0.0.0.0:3000).
YamlConfig
File-based Config deserialized from config/<env>.yml.

Traits§

Config
Application configuration. Used as a trait object (Box<dyn Config>) so the backing store can be swapped without touching call sites.

Functions§

load
Loads the current environment’s configuration as a trait object, falling back to Default values when the file is missing or invalid.