Crate product_os_random

source ·

Structs§

  • A random number generator that retrieves randomness from the operating system.
  • The standard RNG. The PRNG algorithm in StdRng is chosen to be efficient on the current platform, to be statistically strong and unpredictable (meaning a cryptographically secure PRNG).
  • A reference to the thread-local generator

Enums§

Traits§

  • A marker trait used to indicate that an RngCore or BlockRngCore implementation is supposed to be cryptographically secure.
  • An automatically-implemented extension trait on RngCore providing high-level generic methods for sampling values and other convenience methods.
  • The core of a random number generator.
  • A random number generator that can be explicitly seeded.

Functions§

  • 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();. Invoked by the Default trait, making ThreadRng::default() equivalent.