Crate derive_alias[−][src]
Provides a way to alias mutliple derives as one:
use derive_alias::derive_alias; // Generates a macro (`derive_cmp`) that will attach the listed derives to a given item derive_alias! { derive_cmp => #[derive(Eq, PartialEq, Ord, PartialOrd)] } // Attach the derives to `Foo` derive_cmp! { struct Foo; }
You can create multiple aliases at a time:
derive_alias! { derive_cmp => #[derive(Eq, PartialEq, Ord, PartialOrd)], derive_other => #[derive(Copy, Clone)] } derive_cmp! { struct Foo; } derive_other! { struct Bar; }
Macros
derive_alias | Refer to the crate level documentation for details. |