macro_rules! material_select { ( $Select:ident { $( $Enum:ident ( $Param:ident = $Material:ty ) ),+ $(,)? } ) => { ... }; }
The macro for making a union of materials.
You can read more about the technique here.