You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Override visibility and/or name for IterVariants #4
It appears that the IterVariants derive will only produce a private fn iter() which makes it only useful in the module where the enum is defined. I'd like to see a way to override this:
pubmod foo {#[derive(enum_utils::IterVariants)]// well-behaved attributes are namespaced// also so you only have to declare the `enum_utils` attribute in `#[proc_macro_derive]`#[enum_utils(iter(visibility = "pub"))]pubenumFoo{Bar,Baz}}fnmain(){let variants = foo::Foo::iter();}
Additionally, it might be nice to override the generated method name:
Activity