mod_template_macros/
lib.rs

1mod attributes;
2mod helper_attributes;
3mod utils;
4
5/// See [`mod_template::define`](../mod_template/attr.define.html).
6#[proc_macro_attribute]
7#[proc_macro_error::proc_macro_error]
8pub fn define(
9    attr: proc_macro::TokenStream,
10    item: proc_macro::TokenStream,
11) -> proc_macro::TokenStream {
12    attributes::define(attr.into(), item.into()).into()
13}
14
15/// See [`mod_template::__monomorphize_mod`](../mod_template/attr.__monomorphize_mod.html).
16#[proc_macro_attribute]
17#[proc_macro_error::proc_macro_error]
18pub fn __monomorphize_mod(
19    attr: proc_macro::TokenStream,
20    item: proc_macro::TokenStream,
21) -> proc_macro::TokenStream {
22    attributes::__monomorphize_mod(attr.into(), item.into()).into()
23}
24
25/// See [`mod_template::construct`](../mod_template/attr.construct.html).
26#[proc_macro_attribute]
27#[proc_macro_error::proc_macro_error]
28pub fn construct(
29    attr: proc_macro::TokenStream,
30    item: proc_macro::TokenStream,
31) -> proc_macro::TokenStream {
32    attributes::construct(attr.into(), item.into()).into()
33}
34
35/// See [`mod_template::extend_parameter_list`](../mod_template/attr.extend_parameter_list.html).
36#[proc_macro_attribute]
37#[proc_macro_error::proc_macro_error]
38pub fn extend_parameter_list(
39    attr: proc_macro::TokenStream,
40    item: proc_macro::TokenStream,
41) -> proc_macro::TokenStream {
42    attributes::extend_parameter_list(attr.into(), item.into()).into()
43}