Function std::rand::task_rng[src]

pub fn task_rng() -> TaskRng

Retrieve the lazily-initialized task-local random number generator, seeded by the system. Intended to be used in method chaining style, e.g. task_rng().gen::<int>().

The RNG provided will reseed itself from the operating system after generating a certain amount of randomness.

The internal RNG used is platform and architecture dependent, even if the operating system random number generator is rigged to give the same sequence always. If absolute consistency is required, explicitly select an RNG, e.g. IsaacRng or Isaac64Rng.