#rand #enum #distribution

macro rand_enum

Implement rand Distribution for an enum

1 unstable release

0.1.0 Apr 5, 2023

#655 in Procedural macros


90 lines

Rand Enum

Supplies a derive macro that implements the rand standard distribution for an enum, with optional weighting.

NOTE: This currently requires the default features of the rand crate and thus is not #![no_std] compatible

Made with 💗 by Juliette Cordor


~59K SLoC