Crate rand_core

Crate rand_core 

Source
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 le sub-module includes a few small functions to assist implementation of RngCore and SeedableRng.

Modules§

block
The BlockRngCore trait and implementation helpers
le
Little-Endian utilities

Structs§

OsError
Error type of OsRng
OsRng
An interface over the operating-system’s random data source
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