derive(FromFile)
Procedural macro to derive configuration from files, with optional merging capabilities.
Features
- Derive Configuration: Easily load configuration from files into your Rust structs.
- Default Values: Specify default values for struct fields using the
#[from_file(default = "...")]attribute. - Optional Merging: When the
mergefeature is enabled, allows merging multiple configuration sources.
Usage
[]
= "0.2"
use FromFile;
Examples
Use cargo run --example <example_name> to execute a specific example. For example:
Documentation
Full documentation is available at docs.rs.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.