DefaultRandomSource in std::random - Rust (original) (raw)
Struct DefaultRandomSource
pub struct DefaultRandomSource;
🔬This is a nightly-only experimental API. (random
#130703)
Expand description
The default random source.
This asks the system for random data suitable for cryptographic purposes such as key generation. If security is a concern, consult the platform documentation below for the specific guarantees your target provides.
The high quality of randomness provided by this source means it can be quite slow on some targets. If you need a large quantity of random numbers and security is not a concern, consider using an alternative random number generator (potentially seeded from this one).
§Underlying sources
Note that the sources used might change over time.
Consult the documentation for the underlying operations on your supported targets to determine whether they provide any particular desired properties, such as support for reseeding on VM fork operations.