Trait TomlConfig

Source
pub trait TomlConfig<T = HashMap<String, String>>: AbstractConfig<T> {
    // Provided method
    fn load(target: Option<String>) -> Result<T, Error>
       where T: Default,
             HashMap<String, String>: Into<T>,
             Self: Sized { ... }
}
Expand description

Indicates that structure can be initialized from TOML file.

Provided Methods§

Source

fn load(target: Option<String>) -> Result<T, Error>
where T: Default, HashMap<String, String>: Into<T>, Self: Sized,

Load specified TOML files and initialize the structure.

§Arguments
  • target - A comma-separated string of TOML file paths, e.g., “config.toml,local.toml”.
§Errors
  • Error::LoadFileError - If any of the specified TOML files cannot be loaded or parsed.

Implementors§