Rust 76 🦀 Procedural Macros: Derive Macros (#[derive])
Derive macros are the most common kind of procedural macro in Rust. When you write #[derive(Debug, Clone, Serialize)], the compiler invokes a procedural macro for each of those names, passing the token stream of the annotated item, and expects a token stream of new items to append to the surrounding module . The macro is…