pub trait ConfigSource: Send + Sync {
// Required method
fn load(&self) -> Result<AppConfig, AptuError>;
}Expand description
Trait for loading application configuration from any source.
Decouples configuration loading from the filesystem, enabling file-based (TOML), in-memory (test/WASM), and future sources (e.g., iOS plist, remote config) to implement this trait.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ConfigSource for InMemoryConfigSource
impl ConfigSource for TomlConfigSource
Available on non-WebAssembly only.