Crate macro_magic_macros
source ·Macros
- This macro is the primary way to bring exported tokens into scope in your proc macros (though it can also be used in non-proc-macro contexts, and is based on
TokenStream2
for this purpose). - This macro allows you to import tokens across crate boundaries without strict dependency requirements and to use advanced features such as
namespacing
. - This convenient macro can be used to publicly re-export an item that has been exported via
#[export_tokens]
when doing direct imports. - This macro allows you to group a number of
#[export_tokens]
calls and collect them into aResult<Vec<(String, TokenStream2)>>
.
Attribute Macros
- This attribute can be attached to any
syn::Item
-compatible source code item, with the exception ofForeignMod
,Impl
,Macro
,Use
, andVerbatim
. Attaching to an item will “export” that item so that it can be imported elsewhere by name via theimport_tokens!
macro.