pub trait Config: Send + Sync {
// Required methods
fn database(&self) -> &DatabaseConfig;
fn logger(&self) -> &LoggerConfig;
}Expand description
Model-layer configuration. Used as a trait object (Box<dyn Config>) so the
backing store can be swapped without touching call sites.
Required Methods§
Sourcefn database(&self) -> &DatabaseConfig
fn database(&self) -> &DatabaseConfig
Database connection settings.
Sourcefn logger(&self) -> &LoggerConfig
fn logger(&self) -> &LoggerConfig
Logging settings; the model layer reads the sql toggle.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".