+Derive `EnumFieldGetter`. For tuple enum variants, produces `get_n(&self) -> Option<&_>` and `get_n_mut(&mut self) -> Option<&mut _>` methods for each tuple member (starting from 0); for struct variants, getters are of the form `prop(&self) -> Option<&_>` and `prop_mut(&mut self) -> Option<&mut _>`. Getters are only produced so long as that member is the same type across all enum variants - if they are of different types, no getter will be produced for that member. These methods are produced even if that member doesn't exist for all enum variants - in the case that it doesn't exist, the getter will return `None`.
0 commit comments