#rand #enums #distribution

macro rand_enum

Implement rand Distribution for an enum

1 unstable release

0.1.0 Apr 5, 2023

#86 in #rand

MIT/Apache

8KB
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

Dependencies

~3MB
~60K SLoC