[-] [email protected] 7 points 1 week ago

I wanted to learn how to write a simple macro and how to publish a crate.

14
submitted 1 week ago by [email protected] to c/[email protected]

I just learned the basics of macros and figured I'd give a shot trying to solve a problem I've had for a while. Theres just one derive trait in this crate, Variants, that when derived will generate a constant array that holds all of the enum's variants along with a method that exposes a static reference to the constant array.

Give it a look, leave some feedback, maybe even open up a PR. I hope you like what you see!

AshrafIbrahim03

0 post score
0 comment score
joined 1 week ago