signalrs-derive 0.1.0

Derive macros for SignalR client for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use proc_macro::{self, TokenStream};
use quote::quote;
use syn::{parse_macro_input, DeriveInput};

#[proc_macro_derive(HubArgument)]
pub fn derive(input: TokenStream) -> TokenStream {
    let DeriveInput { ident, .. } = parse_macro_input!(input);
    let output = quote! {
        impl signalrs_client::hub::arguments::HubArgument for #ident { }
    };
    output.into()
}