Skip to main content

Config

Trait Config 

Source
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§

Source

fn database(&self) -> &DatabaseConfig

Database connection settings.

Source

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".

Implementors§