Module rand

Source
Expand description

§Reproducible random functions

This module uses the ChaCha8Rng RNG from the rand_chacha crate to achieve reproducible random number generation.

§Examples

let seed = 42;
let mut rng = Rng::seed_from_u64(seed);
assert_eq!(rng.next_u64(), 12578764544318200737);

Traits§

RngCore
Implementation-level interface for RNGs
SeedableRng
A random number generator that can be explicitly seeded.

Type Aliases§

Rng
The RNG used in throughout this crate for algorithms using pseudorandom generation.