There are 4 broad types of macros
- Declerative Macros (vec!, println!) - The most widely used form of macros in Rust is the declarative macro. At their core, declarative macros allow you to write something similar to a Rust
match expression.
- Procedural Macros - Procedural macros accept some code as an input, operate on that code, and produce some code as an output rather than matching against patterns and replacing the code with other code as declarative macros do.
- custom
derive macros
- attribute-like macros
- function-like macros
