mr_utils_macro 0.1.8

utils attribute for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
mod to_vec;

use proc_macro::TokenStream;
use syn::{parse_macro_input, DeriveInput};

#[proc_macro_derive(ToVec, attributes(to_vec))]
pub fn to_vec_derive(input: TokenStream) -> TokenStream {
    // Parse the input tokens into a syntax tree
    let input = parse_macro_input!(input as DeriveInput);
    
    // Call implementation from to_vec module
    to_vec::impl_to_vec(&input)
}