macro_rules! dispatch_source_enum {
($enum_type:ident, $enum_value:expr, |$inner_name:ident| $body:expr) => { ... };
}Expand description
Usage: dispatch_source_enum!(EnumType, enum_value, |inner_ident| body).
Inside body:
- use
inner_identto represent the matched variant. - use
PropTypeto represent the concrete property type. - use
SplitTypeto represent the concrete split type.
Expands to:
ⓘ
match enum_value {
EnumType::Variant1(inner_ident) => {
body
}
...
}Note: inner_ident must be passed as an argument due to macro hygiene.