Macros, A Methodical Introduction
This chapter will introduce Rust's Macro-By-Example system: macro_rules!
. Rather than trying to cover it based on practical examples, it will instead attempt to give you a complete and thorough explanation of how the system works. As such, this is intended for people who just want the system as a whole explained, rather than be guided through it.
There is also the Macros chapter of the Rust Book which is a more approachable, high-level explanation, and the practical introduction chapter of this book, which is a guided implementation of a single macro.