tiny-multihash-proc-macro 0.1.0

Proc macro for deriving custom multihash tables.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
extern crate proc_macro;

mod multihash;
mod utils;

use proc_macro::TokenStream;
use proc_macro_error::proc_macro_error;
use synstructure::{decl_derive, Structure};

decl_derive!([Multihash, attributes(mh)] => #[proc_macro_error] multihash);
fn multihash(s: Structure) -> TokenStream {
    multihash::multihash(s).into()
}