Trait ConfigSource

Source
pub trait ConfigSource: Send + Sync {
    // Required methods
    fn load(&self) -> Result<PartialConfig, ConfigError>;
    fn priority(&self) -> u8;
    fn source_name(&self) -> &'static str;

    // Provided method
    fn watch_paths(&self) -> Vec<PathBuf> { ... }
}
Expand description

Trait for configuration source.

Required Methods§

Source

fn load(&self) -> Result<PartialConfig, ConfigError>

Load partial configuration.

Source

fn priority(&self) -> u8

Priority (lower = higher priority).

Source

fn source_name(&self) -> &'static str

Source name for debugging.

Provided Methods§

Source

fn watch_paths(&self) -> Vec<PathBuf>

File system paths to watch for changes (only file-based sources need override).

Implementors§