Open alex35mil opened 2 months ago
I need to add a custom attribute to a type generated via strum_discriminants:
strum_discriminants
#[derive(EnumDiscriminants)] #[strum_discriminants( name(MyEnumD), derive(CustomDerive), CustomAttr = "value" // <- it doesn't compile )] pub enum MyEnum { ... }
The result should be:
#[derive(CustomDerive)] #[CustomAttr = "value"] pub enum MyEnumD { ... }
How to do that?
This would be super helpful to add #[wasm_bindgen] to the Discriminants variant of an enum!
#[wasm_bindgen]
Discriminants
I need to add a custom attribute to a type generated via
strum_discriminants
:The result should be:
How to do that?