summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 39c27fe..00aa1dc 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -12,6 +12,12 @@ pub struct Config {
}
impl Config {
+ // Provide a default provider, a `Figment`.
+ pub fn figment() -> Figment {
+ Figment::from(Config::default())
+ }
+
+ // Extract the configuration from any `Provider`
pub fn extract<T: Provider>(provider: T) -> figment::error::Result<Config> {
Figment::from(provider).extract()
}