pub trait GrammarRandomNumberGenerator {
// Required method
fn get_number(&mut self, len: usize) -> usize;
}
Expand description
This trait defines a random number generator capable of choosing a single item from a list of len usize. It is used for selecting a rule for using when multiple rules are available.
Required Methods§
sourcefn get_number(&mut self, len: usize) -> usize
fn get_number(&mut self, len: usize) -> usize
This function provides a random number between 0 and len