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