Expand description
Random number generation traits
This crate is mainly of interest to crates publishing implementations of
RngCore. Other users are encouraged to use the rand crate instead
which re-exports the main traits and error types.
RngCore is the core trait implemented by algorithmic pseudo-random number
generators and external random-number sources.
SeedableRng is an extension trait for construction from fixed seeds and
other random number generators.
The impls and le sub-modules include a few small functions to assist
implementation of RngCore.
Modules§
- block
 - The 
BlockRngCoretrait and implementation helpers - impls
 - Helper functions for implementing 
RngCorefunctions. - le
 - Little-Endian utilities
 
Structs§
- OsError
 - Error type of 
OsRng - OsRng
 - An interface over the operating-system’s random data source
 - RngRead
Adapter  - Adapter that enables reading through a 
io::Readfrom aRngCore. - Unwrap
Err  - Wrapper around 
TryRngCoreimplementation which implementsRngCoreby panicking on potential errors. - Unwrap
Mut  - Wrapper around 
TryRngCoreimplementation which implementsRngCoreby panicking on potential errors. 
Traits§
- Crypto
Rng  - A marker trait over 
RngCorefor securely unpredictable RNGs - RngCore
 - Implementation-level interface for RNGs
 - Seedable
Rng  - A random number generator that can be explicitly seeded.
 - TryCrypto
Rng  - A marker trait over 
TryRngCorefor securely unpredictable RNGs - TryRng
Core  - A potentially fallible variant of 
RngCore