derive

Macro derive 

Source
macro_rules! derive {
    ($trait:ident => $outer:ident => $inner:ident) => { ... };
}
Expand description

Defines a derive function named $outer which parses its input TokenStream as a DeriveInput and then invokes the $inner function.

Note that the separate $outer parameter is required - proc macro functions are currently required to live at the crate root, and so the caller must specify the name in order to avoid name collisions.