Derive Macro EnumAsGetters

Source
#[derive(EnumAsGetters)]
Expand description

Macro EnumAsGetters

Derives functions of the form fn as_{variant_name}(&self) -> ... checking that an enumeration instance is of the proper variant and returning shared borrows to its fields. Also see the comments for crate::derive_enum_is_a