Function config_struct::create_config_with_format [−][src]
pub fn create_config_with_format<SrcPath: AsRef<Path>, DstPath: AsRef<Path>>(
format: Format,
filepath: SrcPath,
destination: DstPath,
options: &Options
) -> Result<(), Error>
Generate a Rust module containing struct definitions based on a given config file with an explicitly specified format.
Examples
ⓘThis example is not tested
use config_struct::Format; config_struct::create_config_with_format( Format::Toml, "config.toml", "src/config.rs", &Default::default())?;