tiny_multihash_proc_macro/
lib.rs

1extern crate proc_macro;
2
3mod multihash;
4mod utils;
5
6use proc_macro::TokenStream;
7use proc_macro_error::proc_macro_error;
8use synstructure::{decl_derive, Structure};
9
10decl_derive!([Multihash, attributes(mh)] => #[proc_macro_error] multihash);
11fn multihash(s: Structure) -> TokenStream {
12    multihash::multihash(s).into()
13}