[][src]Module rand::rngs::thread

Thread-local random number generator

Structs

ThreadRng

The type returned by thread_rng, essentially just a reference to the PRNG in thread-local memory.

Constants

THREAD_RNG_KEY
THREAD_RNG_RESEED_THRESHOLD

Functions

thread_rng

Retrieve the lazily-initialized thread-local random number generator, seeded by the system. Intended to be used in method chaining style, e.g. thread_rng().gen::<i32>(), or cached locally, e.g. let mut rng = thread_rng();.