[−][src]Crate rocket_config_codegen
Rocket-Config - Code Generation
This crate implements the code generation portions of Rocket-config. This includes procedural macros.
Procedural Macros
This crate implements the following procedural macros:
- configuration
The syntax for the configuration
macro is:
macro := configuration!(CONFIGURATION_FILE_STEM)
Usage
You should not directly depend on this library. To use the macros,
it suffices to depend on rocket-config
in Cargo.toml
:
[dependencies]
rocket-config = "0.0.1"
And to import the macros via #[macro_use]
in the crate root:
#![feature(proc_macro_hygiene, decl_macro)] #[macro_use] extern crate rocket_config; configuration!("test"); // ...
Or, alternatively, selectively import from the top-level scope:
#![feature(proc_macro_hygiene, decl_macro)] extern crate rocket_config; use rocket_config::configuration; configuration!("test"); // ...
Macros
configuration | The procedural macro for the |