Crate rand [] [src]

Unstable (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

extern crate core as core;
use core::prelude::v1::*;
use core::f64;
use core::intrinsics;
use core::marker::PhantomData;
pub use isaac::{IsaacRng, Isaac64Rng};
pub use chacha::ChaChaRng;
use distributions::{Range, IndependentSample};
use distributions::range::SampleRange;

Modules

chacha [Unstable]

The ChaCha random number generator.

distributions [Unstable]

Sampling from random distributions.

isaac [Unstable]

The ISAAC random number generator.

rand_impls [Unstable]

The implementations of Rand for the built-in types.

reseeding [Unstable]

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

Structs

AsciiGenerator [Unstable]

Iterator which will continuously generate random ascii characters.

Closed01 [Unstable]

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

Generator [Unstable]

Iterator which will generate a stream of random items.

Open01 [Unstable]

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

XorShiftRng [Unstable]

An Xorshift[1] random number generator.

Traits

FloatMath [Unstable]
Rand [Unstable]

A type that can be randomly generated using an Rng.

Rng [Unstable]

A random number generator.

SeedableRng [Unstable]

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