pub trait Random<'a> {
// Required methods
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§
sourcefn initialize(&'a self)
fn initialize(&'a self)
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.