Crate rand [−] [src]
Utilities for random number generation
The Rng trait covers random number generation, and can be used directly
to produce values of some core types (u32, u64, f32, f64, and byte
strings). To generate anything else, or to generate values of the above type
in generic code, use the distributions module. This includes
distributions like ranges, normal and exponential.
Crate rand_core [−] [src]
Random number generation traits
This crate is mainly of interest to crates publishing implementations of
Rng. Other users are encouraged to use the
rand crate instead.
Rng is the core trait implemented by algorithmic pseudo-random number
generators and external random-number sources.
SeedFromRng and SeedableRng are extension traits for construction and
reseeding.
Error is provided for error-handling. It is safe to use in no_std
environments.
The impls sub-module includes a few small functions to assist
implementation of Rng. Since this module is only of interest to Rng
implementors, it is not re-exported from rand.
The mock module includes a mock Rng implementation. Even though this is
only useful for testing, it is currently always built.