Crate rand_core

Crate rand_core 

Source
Expand description

§rand_core: core random number generation traits

crate Docs Apache2/MIT licensed Build Status

This crate provides a collection of traits used by implementations of Random Number Generation (RNG) algorithms. Additionally, it includes helper utilities that assist with the implementation of these traits.

Note that the traits focus solely on the core RNG functionality. Most users should prefer the rand crate, which offers more advanced RNG capabilities built on these core traits, such as sampling from restricted ranges, generating floating-point numbers, list permutations, and more.

§License

The crate is licensed under either of:

at your option.

Modules§

block
The Generator trait and BlockRng
utils
Utilties to aid trait implementations

Structs§

UnwrapErr
Wrapper around TryRngCore implementation which implements RngCore by panicking on potential errors.
UnwrapMut
Wrapper around TryRngCore implementation which implements RngCore by panicking on potential errors.

Traits§

CryptoRng
A marker trait over RngCore for securely unpredictable RNGs
RngCore
Implementation-level interface for RNGs
SeedableRng
A random number generator that can be explicitly seeded.
TryCryptoRng
A marker trait over TryRngCore for securely unpredictable RNGs
TryRngCore
A potentially fallible variant of RngCore