better_config_core/traits.rs
1use crate::error::Error;
2use std::collections::HashMap;
3
4/// The trait for configuration loader.
5pub trait AbstractConfig<T = HashMap<String, String>> {
6 /// Load target file and initialize the structure.
7 fn load(target: Option<String>) -> Result<T, Error>
8 where
9 T: Default,
10 HashMap<String, String>: Into<T>,
11 Self: Sized;
12}