better-config-core 0.2.4

better-config is a library for managing environment variables in Rust applications, providing a more ergonomic and type-safe configuration management experience.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::error::Error;
use std::collections::HashMap;

/// The trait for configuration loader.
pub trait AbstractConfig<T = HashMap<String, String>> {
    /// Load target file and initialize the structure.
    fn load(target: Option<String>) -> Result<T, Error>
    where
        T: Default,
        HashMap<String, String>: Into<T>,
        Self: Sized;
}