layer_enum

Macro layer_enum 

Source
macro_rules! layer_enum {
    ($type_name:ident, $(($var_name:ident: $variant:ty)),+) => { ... };
}
Expand description

This macro generates a layer enum that represents all the possible layers Every layer variant of the enum needs to implement Layer, and the enum will also implement Layer and pass methods to it’s variants

Usage:

layer_enum!(EnumName, (FirstVariant: LayerType), (SecondVariant: SecondLayerType), ..)