Get the latest tech news
Advanced Rust macros with derive-deftly
Introduction: Using derive-deftly for easy derive macros. derive-deftly is a Rust package that you can use to define your own derive macros without having to write low-level procedural macros.
Your templates can define new types, functions, methods, and variables: any kind of item that Rust allows. Your templates can use complex control structure to define configurable behavior or special cases. We'll try to explain each of its features, and how to use it to make correct, reliable templates that handle a broad range of situations.
Or read this on Hacker News