Trait DieRng

Source
pub trait DieRng {
    // Required method
    fn random_int(&self, l: u8, h: u8) -> u8;
}
Expand description

RNG trait defines an interface for a Random Number Generater. A user can implement their own RNG and pass it to the DieBuilder method. This interface is UNSAFE, one utilizing the interface could potentially pass bad parameters i.e. l >= h. The Die will NOT exhibit this behavior.

Required Methods§

Source

fn random_int(&self, l: u8, h: u8) -> u8

Implementors§