-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Would be a continuation of #7604 (and maybe other issues that I could not find).
It would add the possibility to implement the method for all variants at once. It would be made available here (at $0
):
enum My$0Enum {
FirstVariant,
OtherVariant,
}
because it would be enum-wise, implementing the method for each relevant enum (no as_ if no data inside) when not implemented yet. Actually, do as if the assist were used manually on each variant, if applicable.
Also, because authors will not know about this feature, and as a suggestion in general, it could be nice to make the assist available where the current assist (for a one-variant generation) is available.
So two assists would be added:
- Generate
is_
methods for all variants - Generate
as_
methods for all relevant variants
Each assist would be implemented in the same file as the one-variant-wise ones, re-using most of their implementations.