Crate rand [] [src]

🔬 This is a nightly-only experimental API. (rand)

use rand from crates.io

Interface to random number generators in Rust.

This is an experimental library which lives underneath the standard library in its dependency chain. This library is intended to define the interface for random number generation and also provide utilities around doing so. It is not recommended to use this library directly, but rather the official interface through std::rand.

Reexports

pub use isaac::Isaac64Rng;
pub use isaac::IsaacRng;
pub use chacha::ChaChaRng;

Modules

chacha [
Experimental
]

The ChaCha random number generator.

distributions [
Experimental
]

Sampling from random distributions.

isaac [
Experimental
]

The ISAAC random number generator.

reseeding [
Experimental
]

A wrapper around another RNG that reseeds it after it generates a certain number of random bytes.

Structs

AsciiGenerator [
Experimental
]

Iterator which will continuously generate random ascii characters.

Closed01 [
Experimental
]

A wrapper for generating floating point numbers uniformly in the closed interval [0,1] (including both endpoints).

Generator [
Experimental
]

Iterator which will generate a stream of random items.

Open01 [
Experimental
]

A wrapper for generating floating point numbers uniformly in the open interval (0,1) (not including either endpoint).

XorShiftRng [
Experimental
]

An Xorshift[1] random number generator.

Traits

Rng [
Experimental
]

A random number generator.

SeedableRng [
Experimental
]

A random number generator that can be explicitly seeded to produce the same stream of randomness multiple times.