Rust 1.15 added (stabilized) a new feature: Custom derive aka Macros 1.1.
Now apart from usual PartialEq or Debug you can have #[deriving(MyOwnDerive)]. Two primary users of the feature is serde and diesel.
Rust Book link: https://doc.rust-lang.org/stable/book/procedural-macros.html
Get monthly updates about new articles, cheatsheets, and tricks.