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§

source

fn get_number(&mut self, len: usize) -> usize

This function provides a random number between 0 and len

Implementations on Foreign Types§

source§

impl GrammarRandomNumberGenerator for usize

source§

fn get_number(&mut self, _: usize) -> usize

Implementors§