A Rust procedural macro for automatically generating structs from configuration files (JSON, YAML, TOML).
Example Usage
- Create a configuration file (e.g.,
config.yaml). - Use the
generateattribute macro:
server:
port: 8080
features:
- logging
- authentication
Generate and use the struct:
;
API
new(): Creates a new instance with values from the file.default(): Creates a new instance no values from the file.is_empty(): Returnstrueif all fields are default values.