Trait rand_core::SeedableRng [] [src]

pub trait SeedableRng<Seed>: Rng {
    fn reseed(&mut self, _: Seed);
fn from_seed(seed: Seed) -> Self; }

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

Note: this should only be implemented by reproducible generators (i.e. where the algorithm is fixed and results should be the same across platforms). This should not be implemented by wrapper types which choose the underlying implementation based on platform, or which may change the algorithm used in the future. This is to ensure that manual seeding of PRNGs actually does yield reproducible results.

Required Methods

Reseed an RNG with the given seed.

The type of Seed is specified by the implementation (implementation for multiple seed types is possible).

Create a new RNG with the given seed.

The type of Seed is specified by the implementation (implementation for multiple seed types is possible).

Implementors