confiq/source/mod.rs
1pub mod env;
2pub mod file;
3
4use crate::error::Result;
5use async_trait::async_trait;
6use serde_json::Value;
7
8#[async_trait]
9pub trait ConfigSource: Send + Sync {
10 /// Load configuration from this source
11 async fn load(&self) -> Result<Value>;
12
13 /// Whether this source supports hot reloading
14 fn supports_hot_reload(&self) -> bool {
15 false
16 }
17}