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_ident
to represent the matched variant. - use
PropType
to represent the concrete property type. - use
SplitType
to 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.