pub trait Random<'a> {
    fn initialize(&'a self);
    fn reseed(&self, seed: u32);
    fn random(&self) -> u32;
}
Expand description

Generic interface for a synchronous 32-bit random number generator.

Required Methods

Initialize/reseed the random number generator from an internal source. This initialization MAY be deterministic (e.g., based on an EUI-64) or MAY be random (e.g., based on an underlying hardware entropy source); an implementation SHOULD make reseeding random.

Reseed the random number generator with a specific seed. Useful for deterministic tests.

Generate a 32-bit random number.

Implementors