#[derive(GenerateRandom)]
{
// Attributes available to this derive:
#[weight]
}
Expand description
This derive macro provides an implementation
of the GenerateRandom
trait.
Enum variants can be given a weight
attribute
to change how often it is generated.
By default, the weight is 1
.
The probability of a variants is its weight
divided by the sum over all variants.