configr_derive 0.5.0

The dead easy way to use config files in your project
Documentation
1
2
3
4
5
6
7
8
use proc_macro::{self, TokenStream};
use syn::{parse_macro_input, DeriveInput};

#[proc_macro_derive(Configr)]
pub fn configr(input: TokenStream) -> TokenStream {
    let DeriveInput { ident, .. } = parse_macro_input!(input);
    format!("impl Config<Self> for {} {{}}", ident).parse().unwrap()
}