macro-attr modern fork.
This crate provides the
macro_attr! macro that enables the use of custom, macro-based derivations.
macro_attr! macro should be used to wrap an entire single item (
struct, etc.) declaration,
including its attributes (both
derive and others).
All derivations which whose names end with
! will be assumed to be implemented by macros, and treated accordingly.
use macro_attr; // Define some traits to be derived. // Define macros which derive implementations of these macros. }; => ; } // Derive. macro_attr!